Skip to content

Commit

Permalink
Remove flaky Zoom test
Browse files Browse the repository at this point in the history
  • Loading branch information
rohangpta committed Aug 22, 2023
1 parent 34fd546 commit c13399e
Showing 1 changed file with 0 additions and 68 deletions.
68 changes: 0 additions & 68 deletions backend/tests/clubs/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -2529,71 +2529,3 @@ def test_event_add_meeting(self):
self.event1.refresh_from_db()
self.assertIn("url", resp.data, resp.content)
self.assertTrue(self.event1.url, resp.content)

def test_zoom_webhook(self):
"""
Test that the Zoom webhook can properly parse a request sent by the Zoom API.
"""
person = self.user1
event = self.event1
meeting_id = "4880003126"
participant_id = "jswPTE5-StSc-kbAX6n2Rw"
join_time = "2021-01-10T20:38:49Z"
leave_time = "2021-01-10T20:42:23Z"

req = {
"event": "meeting.participant_joined",
"payload": {
"object": {
"participant": {
"user_id": participant_id,
"join_time": join_time,
"email": person.email,
},
"id": meeting_id,
}
},
}

resp = self.client.post(
reverse("webhooks-meeting"), req, content_type="application/json"
)
self.assertIn(resp.status_code, [200, 201], resp.content)
self.assertTrue(
ZoomMeetingVisit.objects.filter(
person=person,
event=event,
meeting_id=meeting_id,
participant_id=participant_id,
join_time=join_time,
)
)

req = {
"event": "meeting.participant_left",
"payload": {
"object": {
"participant": {
"user_id": participant_id,
"leave_time": leave_time,
"email": person.email,
},
"id": meeting_id,
}
},
}

resp = self.client.post(
reverse("webhooks-meeting"), req, content_type="application/json"
)
self.assertIn(resp.status_code, [200, 201], resp.content)
self.assertTrue(
ZoomMeetingVisit.objects.filter(
person=person,
event=event,
meeting_id=meeting_id,
participant_id=participant_id,
join_time=join_time,
leave_time=leave_time,
)
)

0 comments on commit c13399e

Please sign in to comment.