gnunet-svn
[Top][All Lists]
Advanced

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

[libeufin] 03/03: Initiated payments tracking.


From: gnunet
Subject: [libeufin] 03/03: Initiated payments tracking.
Date: Tue, 15 Dec 2020 17:51:43 +0100

This is an automated email from the git hooks/post-receive script.

ms pushed a commit to branch master
in repository libeufin.

commit d0200f2bf663b30d1f1b04d3c0d14fd29c2a5d47
Author: MS <ms@taler.net>
AuthorDate: Tue Dec 15 17:48:51 2020 +0100

    Initiated payments tracking.
    
    Testing the evolution of a initiated payment's status.
    This is done entirely at the Nexus level, without any
    intervention by the Taler facade.
---
 integration-tests/tests.py | 47 +++++++++++++++++++++++++++++++++-------------
 1 file changed, 34 insertions(+), 13 deletions(-)

diff --git a/integration-tests/tests.py b/integration-tests/tests.py
index 2137184..4d6de74 100755
--- a/integration-tests/tests.py
+++ b/integration-tests/tests.py
@@ -185,19 +185,17 @@ def test_ebics_custom_ebics_order():
 # This test makes a payment and expects to see it
 # in the account history.
 def test_payment():
-    resp = assertResponse(
-        post(
-            
f"{PERSONA.nexus.base_url}/bank-accounts/{PERSONA.nexus.bank_label}/payment-initiations",
-            json=dict(
-                iban="FR7630006000011234567890189",
-                bic="AGRIFRPP",
-                name="Jacques La Fayette",
-                subject="integration test",
-                amount="EUR:1",
-            ),
-            auth=PERSONA.nexus.auth
-        )
-    )
+    resp = assertResponse(post(
+        
f"{PERSONA.nexus.base_url}/bank-accounts/{PERSONA.nexus.bank_label}/payment-initiations",
+        json=dict(
+            iban="FR7630006000011234567890189",
+            bic="AGRIFRPP",
+            name="Jacques La Fayette",
+            subject="integration test",
+            amount="EUR:1",
+        ),
+        auth=PERSONA.nexus.auth
+    ))
     PAYMENT_UUID = resp.json().get("uuid")
     assertResponse(post("/".join([
         PERSONA.nexus.base_url,
@@ -232,6 +230,29 @@ def test_payment():
     ))
     assert resp.json()["status"] == "BOOK"
 
+    # Posting a second payment initiation, but not submitting it.
+    resp = assertResponse(post(
+        
f"{PERSONA.nexus.base_url}/bank-accounts/{PERSONA.nexus.bank_label}/payment-initiations",
+        json=dict(
+            iban="FR7630006000011234567890189",
+            bic="AGRIFRPP",
+            name="Jacques La Fayette",
+            subject="integration test",
+            amount="EUR:1",
+        ),
+        auth=PERSONA.nexus.auth
+    ))
+    PAYMENT_UUID_NON_SUBMITTED = resp.json().get("uuid")
+    resp = assertResponse(get("/".join([
+        PERSONA.nexus.base_url,
+        "bank-accounts",
+        PERSONA.nexus.bank_label,
+        "payment-initiations",
+        PAYMENT_UUID_NON_SUBMITTED]),
+        auth=PERSONA.nexus.auth
+    ))
+    assert resp.json()["status"] == None
+
 
 @pytest.fixture
 def fetch_transactions():

-- 
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]