diff options
author | Marcello Stanisci <stanisci.m@gmail.com> | 2018-06-04 22:08:39 +0200 |
---|---|---|
committer | Marcello Stanisci <stanisci.m@gmail.com> | 2018-06-04 22:08:39 +0200 |
commit | f8cde3a2f689eec00d0a5f617542cff435ed860c (patch) | |
tree | e92825bed66ddfe829632ecb948dd0db290020dd | |
parent | 06b9664975bc016727eefdb7fa418a11ece5daf9 (diff) | |
download | backoffice-f8cde3a2f689eec00d0a5f617542cff435ed860c.tar.gz backoffice-f8cde3a2f689eec00d0a5f617542cff435ed860c.tar.bz2 backoffice-f8cde3a2f689eec00d0a5f617542cff435ed860c.zip |
Adapt tests.
Assertions from Python tests needed to care
about the use of the HTTP "Authentication" header.
-rw-r--r-- | talerbackoffice/tests.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/talerbackoffice/tests.py b/talerbackoffice/tests.py index 704c2b9..4ed870b 100644 --- a/talerbackoffice/tests.py +++ b/talerbackoffice/tests.py @@ -33,7 +33,8 @@ class BackofficeTestCase(unittest.TestCase): response = self.app.get("/track/order?para1=1¶2=2") mocked_get.assert_called_with( "http://backend.example.com/track/transaction", - params=dict(para1='1', para2='2')) + params=dict(para1='1', para2='2'), + headers={"Authorization": "ApiKey sandbox"}) # check data is returned verbatim from the backend self.assertEqual(response.data, b'{}\n') @@ -48,7 +49,8 @@ class BackofficeTestCase(unittest.TestCase): response = self.app.get("/track/transfer?para1=1¶2=2") mocked_get.assert_called_with( "http://backend.example.com/track/transfer", - params=dict(para1='1', para2='2')) + params=dict(para1='1', para2='2'), + headers={"Authorization": "ApiKey sandbox"}) # check data is returned verbatim from the backend self.assertEqual(response.data, b'{}\n') @@ -62,7 +64,8 @@ class BackofficeTestCase(unittest.TestCase): response = self.app.get("/history?para1=1¶2=2") mocked_get.assert_called_with( "http://backend.example.com/history", - params=dict(para1='1', para2='2')) + params=dict(para1='1', para2='2'), + headers={"Authorization": "ApiKey sandbox"}) self.assertEqual(response.data, b'{}\n') def test_javascript_license_page(self): |