Private
Public Access
1
0

passing test_imports

This commit is contained in:
Sander Roosendaal
2023-02-11 17:48:39 +01:00
parent def98b9a85
commit 3a82d91d2a
4 changed files with 12 additions and 7 deletions

View File

@@ -1366,7 +1366,7 @@ def mocked_requests(*args, **kwargs):
if stravatester.match(args[0]):
if stravaworkoutlisttester.match(args[0]):
return MockResponse(stravaworkoutlist,200)

View File

@@ -1165,7 +1165,8 @@ class StravaObjects(DjangoTestCase):
self.assertEqual(response.status_code, 200)
@patch('rowers.integrations.integrations.requests.post', side_effect=mocked_requests)
def test_strava_callback(self, mock_post):
@patch('rowers.integrations.strava.requests.get', side_effect=mocked_requests)
def test_strava_callback(self, mock_post, mock_get):
response = self.c.get('/stravacall_back?code=absdef23&scope=read',follow=True)
self.assertEqual(response.status_code, 200)