gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-bank] branch master updated: bring /admin/add-incoming to pass


From: gnunet
Subject: [taler-bank] branch master updated: bring /admin/add-incoming to pass
Date: Fri, 28 Aug 2020 11:24:15 +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 1219247  bring /admin/add-incoming to pass
1219247 is described below

commit 121924732cb231af2aea9eb184613aa14fa9b979
Author: MS <ms@taler.net>
AuthorDate: Fri Aug 28 11:24:03 2020 +0200

    bring /admin/add-incoming to pass
---
 talerbank/app/tests.py | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/talerbank/app/tests.py b/talerbank/app/tests.py
index 98a6e72..6928277 100644
--- a/talerbank/app/tests.py
+++ b/talerbank/app/tests.py
@@ -64,6 +64,35 @@ def clear_db():
         cursor.execute("ALTER SEQUENCE app_bankaccount_account_no_seq" " 
RESTART")
         cursor.execute("ALTER SEQUENCE app_banktransaction_id_seq RESTART")
 
+class WireGatewayTestCase(TestCase):
+    def setUp(self):
+        clear_db()
+        exchange = User.objects.create_user(username="RandomExchange", 
password="XYZ")
+        exchange.save()
+        customer = User.objects.create_user(username="RandomCustomer", 
password="ABC")
+        customer.save()
+        exchange_bank_account = BankAccount(
+            user=exchange,
+            balance=SignedAmount(True, Amount(settings.TALER_CURRENCY, 100, 0))
+        )
+        exchange_bank_account.save()
+        customer_bank_account = BankAccount(
+            user=customer,
+            balance=SignedAmount(True, Amount(settings.TALER_CURRENCY, 100, 0))
+        )
+        customer_bank_account.save()
+        self.client = Client()
+
+    def test_add_incoming(self):
+        r = self.client.post(
+            reverse("twg-add-incoming", kwargs=dict(acct_id="RandomExchange")),
+            HTTP_AUTHORIZATION=make_auth_line("RandomExchange", "XYZ"),
+            content_type="application/json",
+            data=dict(amount=f"{settings.TALER_CURRENCY}:10",
+                      
reserve_pub="FXWC2JHBY8B0XE2MMGAJ9TGPY307TN12HVEKYSTN6HE3GTHTF8XG",
+                      
debit_account="payto://x-taler-bank/localhost/RandomCustomer"))
+        self.assertEqual(r.status_code, 200)
+
 # 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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]