fix
This commit is contained in:
@@ -139,7 +139,7 @@ def send_template_email(from_email, to_email, subject,
|
|||||||
try:
|
try:
|
||||||
res = msg.send()
|
res = msg.send()
|
||||||
except:
|
except:
|
||||||
return 0
|
return 1
|
||||||
else: # pragma: no cover
|
else: # pragma: no cover
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
|||||||
@@ -139,7 +139,7 @@ class NKIntegration(SyncIntegration):
|
|||||||
after = temp
|
after = temp
|
||||||
|
|
||||||
r = self.rower
|
r = self.rower
|
||||||
authorizationstring = str('Bearer ' + r.nktoken)
|
authorizationstring = "Bearer {token}".format(token = r.nktoken)
|
||||||
headers = {'Authorization': authorizationstring,
|
headers = {'Authorization': authorizationstring,
|
||||||
'user-agent': 'sanderroosendaal',
|
'user-agent': 'sanderroosendaal',
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
|
|||||||
@@ -137,6 +137,7 @@ def mocked_session(*args, **kwargs):
|
|||||||
'Location':'MockLocation',
|
'Location':'MockLocation',
|
||||||
}
|
}
|
||||||
self.ok = True
|
self.ok = True
|
||||||
|
self.text = 'Mocked response text'
|
||||||
|
|
||||||
def json(self):
|
def json(self):
|
||||||
return self.json_data
|
return self.json_data
|
||||||
@@ -991,6 +992,7 @@ def mocked_requests(*args, **kwargs):
|
|||||||
self.headers = {
|
self.headers = {
|
||||||
'Location':'MockLocation',
|
'Location':'MockLocation',
|
||||||
}
|
}
|
||||||
|
self.text = 'Mocked response text'
|
||||||
|
|
||||||
def json(self):
|
def json(self):
|
||||||
return self.json_data
|
return self.json_data
|
||||||
@@ -1574,6 +1576,7 @@ class MockResponse: # pragma: no cover
|
|||||||
self.headers = {
|
self.headers = {
|
||||||
'Location':'MockLocation',
|
'Location':'MockLocation',
|
||||||
}
|
}
|
||||||
|
self.text = 'Mocked response text'
|
||||||
|
|
||||||
def json(self):
|
def json(self):
|
||||||
return self.json_data
|
return self.json_data
|
||||||
|
|||||||
BIN
rowers/tests/testdata/testdata.tcx.gz
vendored
BIN
rowers/tests/testdata/testdata.tcx.gz
vendored
Binary file not shown.
Reference in New Issue
Block a user