[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-bank] branch master updated: test TWG transfer and history
From: |
gnunet |
Subject: |
[taler-bank] branch master updated: test TWG transfer and history |
Date: |
Fri, 28 Aug 2020 12:40:34 +0200 |
This is an automated email from the git hooks/post-receive script.
ms pushed a commit to branch master
in repository bank.
The following commit(s) were added to refs/heads/master by this push:
new 47bdf76 test TWG transfer and history
47bdf76 is described below
commit 47bdf762f2836de8ba617abee0be32fe499d0b0b
Author: MS <ms@taler.net>
AuthorDate: Fri Aug 28 12:39:58 2020 +0200
test TWG transfer and history
---
talerbank/app/tests.py | 27 ++++++++++++++++++++++++++-
1 file changed, 26 insertions(+), 1 deletion(-)
diff --git a/talerbank/app/tests.py b/talerbank/app/tests.py
index 9f7ba9f..ada3ed6 100644
--- a/talerbank/app/tests.py
+++ b/talerbank/app/tests.py
@@ -83,7 +83,7 @@ class WireGatewayTestCase(TestCase):
customer_bank_account.save()
self.client = Client()
- def test_add_incoming(self):
+ def test_all(self):
r = self.client.post(
reverse("twg-add-incoming", kwargs=dict(acct_id="RandomExchange")),
HTTP_AUTHORIZATION=make_auth_line("RandomExchange", "XYZ"),
@@ -93,6 +93,31 @@ class WireGatewayTestCase(TestCase):
debit_account="payto://x-taler-bank/localhost/RandomCustomer"))
self.assertEqual(r.status_code, 200)
+ # Test incoming transfers of Exchange.
+ r = self.client.get(
+ reverse("twg-history-incoming",
kwargs=dict(acct_id="RandomExchange")),
+ dict(delta=5),
+ HTTP_AUTHORIZATION=make_auth_line("RandomExchange", "XYZ"),
+ )
+ self.assertEqual(r.status_code, 200)
+
+ # Test outgoing transfers of the Exchange.
+ r = self.client.post(
+ reverse("twg-transfer", kwargs=dict(acct_id="RandomExchange")),
+ HTTP_AUTHORIZATION=make_auth_line("RandomExchange", "XYZ"),
+ content_type="application/json",
+ data=dict(
+ request_uid="0", amount=f"{settings.TALER_CURRENCY}:3",
+ exchange_base_url="mock", wtid="123",
credit_account="payto://x-taler-bank/localhost/RandomCustomer")
+ )
+ r = self.client.get(
+ reverse("twg-history-outgoing",
kwargs=dict(acct_id="RandomExchange")),
+ dict(delta=5),
+ HTTP_AUTHORIZATION=make_auth_line("RandomExchange", "XYZ"),
+ )
+ self.assertEqual(r.status_code, 200)
+ print(r.content.decode("utf-8"))
+
# Testing the "Integration API":
# has three operations: 1) /config, 2,3) create, see status of withdrawal.
class IntegrationConfigTestCase(TestCase):
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-bank] branch master updated: test TWG transfer and history,
gnunet <=