more tests and coverage
This commit is contained in:
@@ -181,6 +181,14 @@ class GarminObjects(DjangoTestCase):
|
||||
res = gs.garmin_session_create(self.ps_trimp,self.u)
|
||||
self.assertEqual(res,1212)
|
||||
|
||||
@patch('rowers.garmin_stuff.requests.get',side_effect=mocked_requests)
|
||||
@patch('rowers.garmin_stuff.requests.post',side_effect=mocked_requests)
|
||||
def test_togarmin_view(self,mock_get,mock_post):
|
||||
url = reverse('plannedsession_togarmin_view',kwargs={'id':self.ps_trimp.id})
|
||||
response = self.c.get(url,follow=True)
|
||||
|
||||
self.assertEqual(response.status_code,200)
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
@override_settings(TESTING=True)
|
||||
|
||||
Reference in New Issue
Block a user