gnunet-svn
[Top][All Lists]
Advanced

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

[libeufin] 02/06: Integration tests.


From: gnunet
Subject: [libeufin] 02/06: Integration tests.
Date: Sun, 15 Nov 2020 22:06:53 +0100

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

ms pushed a commit to branch master
in repository libeufin.

commit 1910639c259816dbdafac7f923abadd61d655a7c
Author: MS <ms@taler.net>
AuthorDate: Fri Nov 13 22:38:11 2020 +0100

    Integration tests.
    
    Testing a empty transaction history
    before any payment is made or received.
---
 integration-tests/tests.py | 16 ++++++++++------
 integration-tests/util.py  |  1 +
 2 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/integration-tests/tests.py b/integration-tests/tests.py
index ff15ead..7a6c118 100755
--- a/integration-tests/tests.py
+++ b/integration-tests/tests.py
@@ -126,10 +126,14 @@ startSandbox(SANDBOX_DB)
 prepareSandbox()
 prepareNexus()
 
-#def test_0():
-#    assertResponse(
-#        REQUEST HERE!
-#    )
+def test_empty_history():
+    resp = assertResponse(
+        get(
+            
f"http://localhost:5001/bank-accounts/{NEXUS_BANK_LABEL}/transactions";,
+            auth=NEXUS_AUTH
+        )
+    )
+    assert len(resp.json().get("transactions")) == 0
 
-flushTablesNexus(NEXUS_DB)
-flushTablesSandbox(SANDBOX_DB)
+# flushTablesNexus(NEXUS_DB)
+# flushTablesSandbox(SANDBOX_DB)
diff --git a/integration-tests/util.py b/integration-tests/util.py
index 6c9ebe8..af90c40 100644
--- a/integration-tests/util.py
+++ b/integration-tests/util.py
@@ -156,3 +156,4 @@ def startNexus(dbname="nexus-test.sqlite3"):
 
 def assertResponse(response, acceptedResponses=[200]):
     assert response.status_code in acceptedResponses
+    return response

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