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