Private
Public Access
1
0

almost passing tests

This commit is contained in:
Sander Roosendaal
2021-12-16 18:14:25 +01:00
parent 4ef13e7c83
commit 626caa9083
10 changed files with 31 additions and 130 deletions

View File

@@ -35,10 +35,6 @@ class OtherUnitTests(TestCase):
defaulttimezone='US/Pacific',
rowerplan='coach')
workoutsbox = Mailbox.objects.create(name='workouts')
workoutsbox.save()
failbox = Mailbox.objects.create(name='Failed')
failbox.save()
# Test get_dates_timeperiod
def test_get_dates_timeperiod(self):
@@ -99,20 +95,6 @@ class OtherUnitTests(TestCase):
self.assertTrue('US/Pacific' in str(startdate.tzinfo))
@patch('rowers.tasks.requests.get',side_effect=mocked_requests)
def test_strava_asyncworkout(self,mock_get):
with open('rowers/tests/testdata/stravaworkoutlist.txt','r') as f:
s = f.read()
jsondata = json.loads(s)
alldata = {}
for item in jsondata:
alldata[item['id']] = item
theid = jsondata[0]['id']
workoutid = stravastuff.create_async_workout(alldata,self.r.user,theid)
self.assertEqual(workoutid,1)
def test_summaryfromsplitdata(self):
with open('rowers/tests/testdata/c2splits.json','r') as f: