Private
Public Access
1
0

fixing tests

This commit is contained in:
Sander Roosendaal
2022-08-17 16:37:47 +02:00
parent 2f73fc310c
commit af3d2f4056

View File

@@ -116,6 +116,10 @@ def mocked_session(*args, **kwargs):
def __init__(self, json_data, status_code):
self.json_data = json_data
self.status_code = status_code
self.reason = 'mock reason'
self.headers = {
'Location':'MockLocation',
}
self.ok = True
def json(self):
@@ -916,6 +920,9 @@ def mocked_requests(*args, **kwargs):
self.json_data = json_data
self.status_code = status_code
self.ok = True
self.headers = {
'Location':'MockLocation',
}
def json(self):
return self.json_data
@@ -1132,7 +1139,7 @@ def mocked_requests(*args, **kwargs):
uauserregex = r'.*?api\.ua\.com\/v7.1\/user\/self\/'
uausertester = re.compile(uauserregex)
tpuploadregex = r'.*?trainingpeaks\.com\/v1\/file'
tpuploadregex = r'.*?trainingpeaks\.com\/v3\/file'
tpuploadtester = re.compile(tpuploadregex)
garmindownloadregex = r'.*?garmin\.com\/mockfile?id=1'
@@ -1445,6 +1452,9 @@ class MockResponse:
self.json_data = json_data
self.status_code = status_code
self.ok = True
self.headers = {
'Location':'MockLocation',
}
def json(self):
return self.json_data