gnunet-svn
[Top][All Lists]
Advanced

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

[libeufin] 01/02: add-incoming passes


From: gnunet
Subject: [libeufin] 01/02: add-incoming passes
Date: Mon, 14 Dec 2020 23:50:54 +0100

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

ms pushed a commit to branch master
in repository libeufin.

commit 4a37f9de87c29e20178e989f404469bb7e45719e
Author: MS <ms@taler.net>
AuthorDate: Mon Dec 14 23:27:58 2020 +0100

    add-incoming passes
---
 integration-tests/tests.py | 13 ++++++++++++-
 integration-tests/util.py  |  7 +++++--
 2 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/integration-tests/tests.py b/integration-tests/tests.py
index 9c22591..8cecec2 100755
--- a/integration-tests/tests.py
+++ b/integration-tests/tests.py
@@ -258,7 +258,18 @@ def test_taler_facade_config(make_taler_facade):
     )
 
 
-def test_taler_facade_history(make_taler_facade):
+def test_taler_facade_incoming(make_taler_facade):
+    assertResponse(post(
+        
f"{PERSONA.nexus.base_url}/facades/{PERSONA.nexus.taler_facade_name}/taler/admin/add-incoming",
+        json=dict(
+            amount="EUR:1",
+            reserve_pub="not ingested for now",
+            debit_account="payto://iban/THEIBAN/THEBIC?sender-name=TheName"
+        ),
+        auth=PERSONA.nexus.auth
+    ))
+
+def test_taler_facade_outgoing(make_taler_facade):
     assertResponse(
         post(
             
f"{PERSONA.nexus.base_url}/facades/{PERSONA.nexus.taler_facade_name}/taler/transfer",
diff --git a/integration-tests/util.py b/integration-tests/util.py
index bba34df..a7fbbac 100644
--- a/integration-tests/util.py
+++ b/integration-tests/util.py
@@ -193,6 +193,9 @@ def startNexus(dbConnString):
     return nexus
 
 def assertResponse(r, acceptedResponses=[200]):
-    assert r.status_code in acceptedResponses, \
-        f"Unexpected status code (r.status_code) from: {r.request.method} 
{r.url}"
+    def http_trace(r):
+        request = f"{r.request.method} 
{r.request.url}\n{r.request.body.decode('utf-8')}"
+        response = f"{r.status_code} {r.reason}\n{r.text}"
+        return f"(the following communication 
failed)\n\n{request}\n\n{response}"
+    assert r.status_code in acceptedResponses, http_trace(r)
     return r

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