change osm to arcgis
This commit is contained in:
@@ -342,7 +342,9 @@ class VirtualEventViewTest(MyTestCase):
|
||||
#Scenarios
|
||||
|
||||
# races page
|
||||
def test_races_view(self):
|
||||
@patch('django.contrib.gis.geoip2.GeoIP2.city', side_effect=mocked_requests)
|
||||
@patch('rowers.courses.geocoder.osm', side_effect=mock_osm)
|
||||
def test_races_view(self, mock_get, mock_osm):
|
||||
login = self.c.login(username=self.u.username, password=self.password)
|
||||
self.assertTrue(login)
|
||||
|
||||
@@ -384,7 +386,8 @@ class VirtualEventViewTest(MyTestCase):
|
||||
|
||||
|
||||
# set up new OTE race
|
||||
def test_new_indoorrace(self):
|
||||
@patch('django.contrib.gis.geoip2.GeoIP2.city', side_effect=mocked_requests)
|
||||
def test_new_indoorrace(self, mock_get):
|
||||
login = self.c.login(username=self.u.username, password=self.password)
|
||||
self.assertTrue(login)
|
||||
|
||||
@@ -467,7 +470,8 @@ class VirtualEventViewTest(MyTestCase):
|
||||
|
||||
|
||||
# set up new OTE race
|
||||
def test_edit_indoorrace(self):
|
||||
@patch('django.contrib.gis.geoip2.GeoIP2.city', side_effect=mocked_requests)
|
||||
def test_edit_indoorrace(self, mock_get):
|
||||
login = self.c.login(username=self.u.username, password=self.password)
|
||||
self.assertTrue(login)
|
||||
|
||||
@@ -514,7 +518,8 @@ class VirtualEventViewTest(MyTestCase):
|
||||
|
||||
# set up new otw race
|
||||
# set up new OTE race
|
||||
def test_new_race(self):
|
||||
@patch('django.contrib.gis.geoip2.GeoIP2.city', side_effect=mocked_requests)
|
||||
def test_new_race(self, mock_get):
|
||||
login = self.c.login(username=self.u.username, password=self.password)
|
||||
self.assertTrue(login)
|
||||
|
||||
@@ -551,7 +556,8 @@ class VirtualEventViewTest(MyTestCase):
|
||||
expected_url = reverse('virtualevents_view'),
|
||||
status_code=302,target_status_code=200)
|
||||
|
||||
def test_edit_race(self):
|
||||
@patch('django.contrib.gis.geoip2.GeoIP2.city', side_effect=mocked_requests)
|
||||
def test_edit_race(self, mock_get):
|
||||
login = self.c.login(username=self.u.username, password=self.password)
|
||||
self.assertTrue(login)
|
||||
|
||||
@@ -590,7 +596,8 @@ class VirtualEventViewTest(MyTestCase):
|
||||
status_code=302,target_status_code=200)
|
||||
|
||||
# view
|
||||
def test_race_view(self):
|
||||
@patch('django.contrib.gis.geoip2.GeoIP2.city', side_effect=mocked_requests)
|
||||
def test_race_view(self, mock_get):
|
||||
login = self.c.login(username=self.u.username, password=self.password)
|
||||
self.assertTrue(login)
|
||||
|
||||
@@ -614,7 +621,8 @@ class VirtualEventViewTest(MyTestCase):
|
||||
|
||||
|
||||
# register # withdraw
|
||||
def test_register_race_view(self):
|
||||
@patch('django.contrib.gis.geoip2.GeoIP2.city', side_effect=mocked_requests)
|
||||
def test_register_race_view(self, mock_get):
|
||||
login = self.c.login(username=self.u.username, password=self.password)
|
||||
self.assertTrue(login)
|
||||
|
||||
@@ -691,7 +699,8 @@ class VirtualEventViewTest(MyTestCase):
|
||||
|
||||
|
||||
# add boat (OTW)
|
||||
def test_register_otwrace_view(self):
|
||||
@patch('django.contrib.gis.geoip2.GeoIP2.city', side_effect=mocked_requests)
|
||||
def test_register_otwrace_view(self, mock_get):
|
||||
login = self.c.login(username=self.u.username, password=self.password)
|
||||
self.assertTrue(login)
|
||||
|
||||
@@ -760,7 +769,8 @@ class VirtualEventViewTest(MyTestCase):
|
||||
|
||||
|
||||
# submit result (OTE)
|
||||
def test_ote_submit(self):
|
||||
@patch('django.contrib.gis.geoip2.GeoIP2.city', side_effect=mocked_requests)
|
||||
def test_ote_submit(self, mock_get):
|
||||
login = self.c.login(username=self.upiet.username, password=self.passwordpiet)
|
||||
self.assertTrue(login)
|
||||
|
||||
@@ -793,7 +803,8 @@ class VirtualEventViewTest(MyTestCase):
|
||||
self.assertEqual(response.status_code,200)
|
||||
|
||||
# submit result (OTE)
|
||||
def test_ote_submitfalse(self):
|
||||
@patch('django.contrib.gis.geoip2.GeoIP2.city', side_effect=mocked_requests)
|
||||
def test_ote_submitfalse(self, mock_get):
|
||||
login = self.c.login(username=self.upiet.username, password=self.passwordpiet)
|
||||
self.assertTrue(login)
|
||||
|
||||
@@ -820,7 +831,8 @@ class VirtualEventViewTest(MyTestCase):
|
||||
self.assertTrue(not therecord.coursecompleted)
|
||||
|
||||
# submit result (OTW)
|
||||
def test_otw_submit(self):
|
||||
@patch('django.contrib.gis.geoip2.GeoIP2.city', side_effect=mocked_requests)
|
||||
def test_otw_submit(self, mock_get):
|
||||
login = self.c.login(username=self.upiet.username, password=self.passwordpiet)
|
||||
self.assertTrue(login)
|
||||
|
||||
@@ -842,7 +854,8 @@ class VirtualEventViewTest(MyTestCase):
|
||||
|
||||
# course view
|
||||
# submit result (OTW)
|
||||
def test_otw_courses(self):
|
||||
@patch('django.contrib.gis.geoip2.GeoIP2.city', side_effect=mocked_requests)
|
||||
def test_otw_courses(self, mock_get):
|
||||
login = self.c.login(username=self.upiet.username, password=self.passwordpiet)
|
||||
self.assertTrue(login)
|
||||
|
||||
@@ -861,7 +874,8 @@ class VirtualEventViewTest(MyTestCase):
|
||||
response = self.c.get(url)
|
||||
self.assertEqual(response.status_code,200)
|
||||
|
||||
def test_otw_courses_edit(self):
|
||||
@patch('django.contrib.gis.geoip2.GeoIP2.city', side_effect=mocked_requests)
|
||||
def test_otw_courses_edit(self, mock_get):
|
||||
login = self.c.login(username=self.u.username, password=self.password)
|
||||
self.assertTrue(login)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user