Private
Public Access
1
0

fixing c2 timezone issue when timezone is unknown

This commit is contained in:
Sander Roosendaal
2021-05-18 06:47:27 +02:00
parent acc4c6f305
commit bad14ed49a
3 changed files with 30 additions and 3 deletions

View File

@@ -719,6 +719,8 @@ def mocked_requests(*args, **kwargs):
with open('rowers/tests/testdata/c2_timezone2.json','r') as infile:
c2timezoneworkoutdata2 = json.load(infile)
with open('rowers/tests/testdata/c2_timezonebad.json','r') as infile:
c2timezoneworkoutdatabad = json.load(infile)
with open('rowers/tests/testdata/c2jsonstrokedata.txt','r') as infile:
c2strokedata = json.load(infile)
@@ -1192,6 +1194,8 @@ def mocked_requests(*args, **kwargs):
return MockResponse(c2workoutdata,200)
elif '31' in args[0]:
return MockResponse(c2timezoneworkoutdata2,200)
elif '32' in args[0]:
return MockResponse(c2timezoneworkoutdatabad,200)
else:
return MockResponse(c2timezoneworkoutdata,200)
elif c2workoutlisttester.match(args[0]):