From 2722955f138328a1072b8566b43318bb092bedc6 Mon Sep 17 00:00:00 2001 From: Sander Roosendaal Date: Fri, 20 Jun 2025 19:38:54 +0200 Subject: [PATCH] fix --- rowers/emails.py | 2 +- rowers/integrations/nk.py | 2 +- rowers/tests/mocks.py | 3 +++ rowers/tests/testdata/testdata.tcx.gz | Bin 3989 -> 3989 bytes 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/rowers/emails.py b/rowers/emails.py index 0977fc33..d79b3a70 100644 --- a/rowers/emails.py +++ b/rowers/emails.py @@ -139,7 +139,7 @@ def send_template_email(from_email, to_email, subject, try: res = msg.send() except: - return 0 + return 1 else: # pragma: no cover return 0 diff --git a/rowers/integrations/nk.py b/rowers/integrations/nk.py index a26a7cc9..e6694482 100644 --- a/rowers/integrations/nk.py +++ b/rowers/integrations/nk.py @@ -139,7 +139,7 @@ class NKIntegration(SyncIntegration): after = temp r = self.rower - authorizationstring = str('Bearer ' + r.nktoken) + authorizationstring = "Bearer {token}".format(token = r.nktoken) headers = {'Authorization': authorizationstring, 'user-agent': 'sanderroosendaal', 'Content-Type': 'application/json', diff --git a/rowers/tests/mocks.py b/rowers/tests/mocks.py index d969b8ef..0db2ae33 100644 --- a/rowers/tests/mocks.py +++ b/rowers/tests/mocks.py @@ -137,6 +137,7 @@ def mocked_session(*args, **kwargs): 'Location':'MockLocation', } self.ok = True + self.text = 'Mocked response text' def json(self): return self.json_data @@ -991,6 +992,7 @@ def mocked_requests(*args, **kwargs): self.headers = { 'Location':'MockLocation', } + self.text = 'Mocked response text' def json(self): return self.json_data @@ -1574,6 +1576,7 @@ class MockResponse: # pragma: no cover self.headers = { 'Location':'MockLocation', } + self.text = 'Mocked response text' def json(self): return self.json_data diff --git a/rowers/tests/testdata/testdata.tcx.gz b/rowers/tests/testdata/testdata.tcx.gz index 8be32d41843def2351fa629ff0930631e6d0623f..1d07dcefdafdaa6b0dffef9c3fda959fea19ce61 100644 GIT binary patch delta 16 XcmbO#KUJPxzMF$%$(+!Q?0x(IDp~~; delta 16 XcmbO#KUJPxzMF$%*RtS^?0x(ID<%ap