fix tets
This commit is contained in:
@@ -10,7 +10,7 @@ import arrow
|
||||
import urllib
|
||||
from uuid import uuid4
|
||||
|
||||
|
||||
import json
|
||||
|
||||
class SyncIntegration(metaclass=ABCMeta):
|
||||
oauth_data = {
|
||||
|
||||
@@ -203,13 +203,13 @@ class StravaIntegration(SyncIntegration):
|
||||
_ = self.open()
|
||||
except NoTokenError:
|
||||
return 0
|
||||
csvfilename = 'media/{code}_{stravaid}.csv'.format(
|
||||
|
||||
code=uuid4().hex[:16], stravaid=stravaid)
|
||||
csvfilename = 'media/{code}_{id}.csv'.format(
|
||||
code=uuid4().hex[:16], id=id)
|
||||
job = myqueue(queue,
|
||||
fetch_strava_workout,
|
||||
self.rower.stravatoken,
|
||||
oauth_data,
|
||||
self.oauth_data,
|
||||
id,
|
||||
csvfilename,
|
||||
self.user.id,
|
||||
@@ -311,7 +311,7 @@ class StravaIntegration(SyncIntegration):
|
||||
|
||||
# token_refresh
|
||||
def token_refresh(self, *args, **kwargs):
|
||||
return super(StravaIntegration).token_refresh(*args, **kwargs)
|
||||
return super(StravaIntegration, self).token_refresh(*args, **kwargs)
|
||||
|
||||
def set_strava_athlete_id():
|
||||
r = self.rower()
|
||||
|
||||
@@ -1164,7 +1164,7 @@ class StravaObjects(DjangoTestCase):
|
||||
|
||||
self.assertEqual(response.status_code, 200)
|
||||
|
||||
@patch('rowers.integrations.strava.requests.post', side_effect=mocked_requests)
|
||||
@patch('rowers.integrations.integrations.requests.post', side_effect=mocked_requests)
|
||||
def test_strava_callback(self, mock_post):
|
||||
response = self.c.get('/stravacall_back?code=absdef23&scope=read',follow=True)
|
||||
self.assertEqual(response.status_code, 200)
|
||||
|
||||
BIN
rowers/tests/testdata/testdata.tcx.gz
vendored
Normal file
BIN
rowers/tests/testdata/testdata.tcx.gz
vendored
Normal file
Binary file not shown.
Reference in New Issue
Block a user