Update tests

This commit is contained in:
Antoine Nguyen
2026-01-12 12:40:44 +01:00
parent d19c223fde
commit 1c710c7fdf
2 changed files with 9 additions and 6 deletions
+3
View File
@@ -49,6 +49,9 @@ class Calendar:
def add_event(self, data):
return True
def save_event(self, *args, **kwargs):
return True
def event_by_url(self, url):
res = objects.Event(url=url, data=EV1, parent=self)
return res
+6 -6
View File
@@ -428,8 +428,8 @@ class EventViewSetTestCase(TestDataMixin, ModoAPITestCase):
url = f"/api/v2/user-calendars/{self.calendar.pk}/events/"
data = {
"title": "Test event",
"start": "2018-03-27T00:00:00Z",
"end": "2018-03-28T00:00:00Z",
"start_date": "2018-03-27",
"end_date": "2018-03-28",
"allDay": True,
"color": "#ffdddd",
"description": "Description",
@@ -483,8 +483,8 @@ class EventViewSetTestCase(TestDataMixin, ModoAPITestCase):
url = f"/api/v2/user-calendars/{self.calendar.pk}/events/1234/"
data = {
"start": "2018-03-27T00:00:00Z",
"end": "2018-03-28T00:00:00Z",
"start_date": "2018-03-27",
"end_date": "2018-03-28",
"allDay": True,
}
response = self.client.patch(url, data=data, format="json")
@@ -496,8 +496,8 @@ class EventViewSetTestCase(TestDataMixin, ModoAPITestCase):
self.client.post(reverse("core:login"), data)
data = {
"title": "Test event",
"start": "2018-03-27T00:00:00Z",
"end": "2018-03-28T00:00:00Z",
"start_date": "2018-03-27",
"end_date": "2018-03-28",
"allDay": True,
"color": "#ffdddd",
"description": "Description",