Skip to content

Commit

Permalink
tests: validation error shall be caught
Browse files Browse the repository at this point in the history
  • Loading branch information
thomersch committed Jan 14, 2022
1 parent e179927 commit ee58618
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions osmcal/test_views.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
from django.core.exceptions import ValidationError
from django.test import Client, TestCase


class EventListTest(TestCase):
def test_location_out_of_range(self):
# Based on Sentry report OSM-CALENDAR-1W
c = Client()
with self.assertRaises(ValidationError):
resp = c.get('/events.ics?around=5564') # The around parameter obviously doesn't make any sense.
self.assertEqual(resp.status_code, 400)
resp = c.get('/events.ics?around=5564') # The around parameter obviously doesn't make any sense.
self.assertEqual(resp.status_code, 400)

def test_location_around(self):
c = Client()
Expand Down

0 comments on commit ee58618

Please sign in to comment.