Skip to content

Commit

Permalink
Update test_views.py to include radius parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
kmpoppe authored Sep 24, 2024
1 parent c0cc392 commit 83519ef
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions osmcal/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,18 @@


class EventListTest(TestCase):
def test_location_out_of_range_low(self):
def test_location_out_of_range(self):
# Based on Sentry report OSM-CALENDAR-1W
c = Client()
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_out_of_range_high(self):
# Based on Sentry report OSM-CALENDAR-1W
c = Client()
resp = c.get("/events.ics?around=55,13,5,1") # The around parameter obviously doesn't make any sense.
self.assertEqual(resp.status_code, 400)

def test_location_around_50k(self):
c = Client()
resp = c.get("/events.ics?around=52,13")
self.assertEqual(resp.status_code, 200)

def test_location_around_dist(self):
c = Client()
resp = c.get("/events.ics?around=52,13,5")
resp = c.get("/events.ics?around=52,13&around_radius=5")
self.assertEqual(resp.status_code, 200)

0 comments on commit 83519ef

Please sign in to comment.