mirror of
https://github.com/ae-utbm/sith.git
synced 2025-01-08 16:11:17 +00:00
Basic test for internal calendar
This commit is contained in:
parent
eb3db134f8
commit
2749a88704
@ -106,3 +106,17 @@ class TestExternalCalendar:
|
|||||||
assert f.read() == external_response.value
|
assert f.read() == external_response.value
|
||||||
|
|
||||||
assert mock_request.call_count == 2
|
assert mock_request.call_count == 2
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.django_db
|
||||||
|
class TestInternalCalendar:
|
||||||
|
@pytest.fixture(autouse=True)
|
||||||
|
def clear_cache(self):
|
||||||
|
IcsCalendar._INTERNAL_CALENDAR.unlink(missing_ok=True)
|
||||||
|
|
||||||
|
def test_fetch_success(self, client: Client):
|
||||||
|
response = client.get(reverse("api:calendar_internal"))
|
||||||
|
assert response.status_code == 200
|
||||||
|
out_file = accel_redirect_to_file(response)
|
||||||
|
assert out_file is not None
|
||||||
|
assert out_file.exists()
|
||||||
|
Loading…
Reference in New Issue
Block a user