From af3d2f4056e412f86a5f285854ecc4d827b3c038 Mon Sep 17 00:00:00 2001 From: Sander Roosendaal Date: Wed, 17 Aug 2022 16:37:47 +0200 Subject: [PATCH] fixing tests --- rowers/tests/mocks.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/rowers/tests/mocks.py b/rowers/tests/mocks.py index a2584dc1..4e8bfc34 100644 --- a/rowers/tests/mocks.py +++ b/rowers/tests/mocks.py @@ -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