From b6c7d60498c24b86f2a43c459a1e09c93c593ce7 Mon Sep 17 00:00:00 2001 From: Marcello Stanisci Date: Thu, 6 Dec 2018 19:13:37 +0100 Subject: Reproducing error from #5499. --- talerbank/app/tests.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'talerbank/app/tests.py') diff --git a/talerbank/app/tests.py b/talerbank/app/tests.py index a3fc291..fc73a8c 100644 --- a/talerbank/app/tests.py +++ b/talerbank/app/tests.py @@ -347,6 +347,20 @@ class AddIncomingTestCase(TestCase): **{"HTTP_X_TALER_BANK_USERNAME": "user_user", "HTTP_X_TALER_BANK_PASSWORD": "user_password"}) self.assertEqual(403, response.status_code) + # Try use a non-existent recipient. + data = '{"auth": {"type": "basic"}, \ + "credit_account": 1987, \ + "subject": "TESTWTID", \ + "exchange_url": "https://exchange.test", \ + "amount": "%s:1"}' % settings.TALER_CURRENCY + response = client.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(403, response.status_code) class HistoryContext: def __init__(self, expected_resp, **kwargs): -- cgit v1.2.3