Skip to content

Commit

Permalink
✅ Update tests for get zoom id
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuel Guillemet committed Aug 31, 2023
1 parent b3e5491 commit 32cb267
Showing 1 changed file with 25 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
NotFoundError,
)
from ms_python_client.utils.event_generator import (
ZOOM_ID_EXTENDED_PROPERTY_ID,
EventParameters,
PartialEventParameters,
)
Expand Down Expand Up @@ -154,7 +155,7 @@ def test_get_event_zoom_id(self):
"subject": "Test Event",
"singleValueExtendedProperties": [
{
"id": "String {66f5a359-4659-4830-9070-00040ec6ac6e} Name ZoomId",
"id": ZOOM_ID_EXTENDED_PROPERTY_ID,
"value": "1234567890",
}
],
Expand All @@ -170,6 +171,29 @@ def test_get_event_zoom_id(self):
assert zoom_id == "1234567890"
assert responses.calls[0].request.headers["test"] == "test"

@responses.activate
def test_get_event_zoom_id_not_found(self):
responses.add(
responses.GET,
f"{TEST_API_ENDPOINT}/users/user_id/calendar/events/event_id",
json={
"id": "event_id",
"subject": "Test Event",
"singleValueExtendedProperties": [
{
"id": "Another id",
"value": "Random value",
}
],
},
status=200,
)
headers = {
"test": "test",
}
with pytest.raises(NotFoundError):
self.events_component.get_event_zoom_id("user_id", "event_id", headers)

@responses.activate
def test_get_current_event(self):
responses.add(
Expand Down

0 comments on commit 32cb267

Please sign in to comment.