diff options
author | Marcello Stanisci <marcello.stanisci@inria.fr> | 2017-05-23 15:52:14 +0200 |
---|---|---|
committer | Marcello Stanisci <marcello.stanisci@inria.fr> | 2017-05-29 11:24:24 +0200 |
commit | 85fea9b7b0e249fc7e6caad2a00452257df75938 (patch) | |
tree | c30a5ccd27c7d3187b1837c43e80942b359f64ce /talerbank/app/tests.py | |
parent | 94308507fbbc5b67a3d88029032ad6fc8d4bb987 (diff) | |
download | bank-85fea9b7b0e249fc7e6caad2a00452257df75938.tar.gz bank-85fea9b7b0e249fc7e6caad2a00452257df75938.tar.bz2 bank-85fea9b7b0e249fc7e6caad2a00452257df75938.zip |
addressing #5013
Diffstat (limited to 'talerbank/app/tests.py')
-rw-r--r-- | talerbank/app/tests.py | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/talerbank/app/tests.py b/talerbank/app/tests.py index 4de125e..092d21c 100644 --- a/talerbank/app/tests.py +++ b/talerbank/app/tests.py @@ -123,6 +123,20 @@ class AddIncomingTestCase(TestCase): content_type="application/json", follow=True, **{"HTTP_X_TALER_BANK_USERNAME": "user_user", "HTTP_X_TALER_BANK_PASSWORD": "user_password"}) self.assertEqual(200, response.status_code) + data = '{"auth": {"type": "basic"}, \ + "credit_account": 1, \ + "wtid": "TESTWTID", \ + "exchange_url": "https://exchange.test", \ + "amount": \ + {"value": 1, \ + "fraction": 0, \ + "currency": "%s"}}' \ + % "WRONGCURRENCY" + response = c.post(reverse("add-incoming", urlconf=urls), + data=data, + content_type="application/json", + follow=True, **{"HTTP_X_TALER_BANK_USERNAME": "user_user", "HTTP_X_TALER_BANK_PASSWORD": "user_password"}) + self.assertEqual(406, response.status_code) class HistoryTestCase(TestCase): @@ -171,7 +185,6 @@ class HistoryTestCase(TestCase): response = c.get(reverse("history", urlconf=urls), {"auth": "basic", "delta": "1", "start": "11"}, **{"HTTP_X_TALER_BANK_USERNAME": "User", "HTTP_X_TALER_BANK_PASSWORD": "Password"}) response_txt = response.content.decode("utf-8") - logger.info(response_txt) self.assertEqual(204, response.status_code) # Get credit records response = c.get(reverse("history", urlconf=urls), {"auth": "basic", "delta": "+1", "direction": "credit"}, |