[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-bank] branch master updated: test "testing" registration API
From: |
gnunet |
Subject: |
[taler-bank] branch master updated: test "testing" registration API |
Date: |
Tue, 25 Aug 2020 18:27:25 +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 f0cb54c test "testing" registration API
f0cb54c is described below
commit f0cb54c5e3bf26598a72ec75d31d9435e46b66b5
Author: MS <ms@taler.net>
AuthorDate: Tue Aug 25 18:27:21 2020 +0200
test "testing" registration API
---
talerbank/app/testconfigs/bank-check.conf | 2 ++
talerbank/app/tests.py | 17 +++++++++++++++++
2 files changed, 19 insertions(+)
diff --git a/talerbank/app/testconfigs/bank-check.conf
b/talerbank/app/testconfigs/bank-check.conf
index 5e13460..6ccfa0e 100644
--- a/talerbank/app/testconfigs/bank-check.conf
+++ b/talerbank/app/testconfigs/bank-check.conf
@@ -5,6 +5,8 @@ CURRENCY = KUDOS
[bank]
+ALLOW_REGISTRATIONS = yes
+
# Which database should we use?
DATABASE = postgres:///talercheck
NDIGITS = 2
diff --git a/talerbank/app/tests.py b/talerbank/app/tests.py
index 3c98986..97e48d9 100644
--- a/talerbank/app/tests.py
+++ b/talerbank/app/tests.py
@@ -64,6 +64,23 @@ def clear_db():
cursor.execute("ALTER SEQUENCE app_bankaccount_account_no_seq" "
RESTART")
cursor.execute("ALTER SEQUENCE app_banktransaction_id_seq RESTART")
+# Testing the "Access API":
+# (testing) registration + ask for balance + withdraw: create / ask status
/ abort / confirm.
+class TestingRegistrationTestCase(TestCase):
+ def setUp(self):
+ clear_db()
+ self.user = User.objects.create_user(username="Bank", password="Bank")
+ self.user.save()
+ self.user_bank_account = BankAccount(user=self.user)
+ self.user_bank_account.save()
+
+ def test_testing_registration(self):
+ c = Client()
+ r = c.post(reverse("testing-withdraw-register"),
+ data=dict(username="x", password="y"),
+ content_type="application/json")
+ self.assertEqual(r.status_code, 200)
+
class ReservePubExtractionTestCase(TestCase):
def test_extraction(self):
self.assertTrue(get_reserve_pub("0T096A11M57GWGG0P6ZM9Z8G5829BFJFH2AN9R5T80FJ931DX7GG"))
--
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 "testing" registration API,
gnunet <=