mirror of https://github.com/zulip/zulip.git
compose: Verify request payload in Zoom meeting creation test
Verify that Zoom meeting creation logic sends the expected request payload for configuring host_video and participant video.
This commit is contained in:
parent
66b9c06de6
commit
2414ddd2d4
|
@ -1,5 +1,6 @@
|
|||
from unittest import mock
|
||||
|
||||
import orjson
|
||||
import responses
|
||||
from django.core.signing import Signer
|
||||
from django.http import HttpResponseRedirect
|
||||
|
@ -67,6 +68,15 @@ class TestVideoCall(ZulipTestCase):
|
|||
responses.calls[-1].request.url,
|
||||
"https://api.zoom.us/v2/users/me/meetings",
|
||||
)
|
||||
self.assertEqual(
|
||||
orjson.loads(responses.calls[-1].request.body),
|
||||
{
|
||||
"settings": {
|
||||
"host_video": True,
|
||||
"participant_video": True,
|
||||
},
|
||||
},
|
||||
)
|
||||
self.assertEqual(
|
||||
responses.calls[-1].request.headers["Authorization"],
|
||||
"Bearer newtoken",
|
||||
|
@ -92,6 +102,15 @@ class TestVideoCall(ZulipTestCase):
|
|||
responses.calls[-1].request.url,
|
||||
"https://api.zoom.us/v2/users/me/meetings",
|
||||
)
|
||||
self.assertEqual(
|
||||
orjson.loads(responses.calls[-1].request.body),
|
||||
{
|
||||
"settings": {
|
||||
"host_video": False,
|
||||
"participant_video": False,
|
||||
},
|
||||
},
|
||||
)
|
||||
self.assertEqual(
|
||||
responses.calls[-1].request.headers["Authorization"],
|
||||
"Bearer newtoken",
|
||||
|
|
Loading…
Reference in New Issue