gnunet-svn
[Top][All Lists]
Advanced

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

[libeufin] branch master updated: add fail() helper


From: gnunet
Subject: [libeufin] branch master updated: add fail() helper
Date: Mon, 18 May 2020 15:09:33 +0200

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

ms pushed a commit to branch master
in repository libeufin.

The following commit(s) were added to refs/heads/master by this push:
     new fd8b6fa  add fail() helper
fd8b6fa is described below

commit fd8b6fa526c0d16eb3758282083598acfa0abfb6
Author: MS <address@hidden>
AuthorDate: Mon May 18 15:09:21 2020 +0200

    add fail() helper
---
 integration-tests/test-ebics.py | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/integration-tests/test-ebics.py b/integration-tests/test-ebics.py
index d6d72ec..50a217b 100755
--- a/integration-tests/test-ebics.py
+++ b/integration-tests/test-ebics.py
@@ -55,6 +55,12 @@ SUBSCRIBER_BIC="BUKBGB22"
 SUBSCRIBER_NAME="Oliver Smith"
 BANK_ACCOUNT_LABEL="savings"
 
+def fail(msg):
+    print(msg)
+    nexus.terminate()
+    sandbox.terminate()
+    exit(1)
+
 def checkPorts(ports):
     for i in ports:
         s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
@@ -266,7 +272,8 @@ resp = assertResponse(
         headers=dict(Authorization=USER_AUTHORIZATION_HEADER)
     )
 )
-assert(len(resp.json().get("transactions")) == 0)
+if len(resp.json().get("transactions")) != 0:
+    fail("unexpected number of transactions")
 
 #5.a, prepare a payment
 resp = assertResponse(
@@ -283,7 +290,8 @@ resp = assertResponse(
     )
 )
 PREPARED_PAYMENT_UUID=resp.json().get("uuid")
-assert(PREPARED_PAYMENT_UUID != None)
+if PREPARED_PAYMENT_UUID == None:
+    fail("Payment UUID not received")
 
 #5.b, submit prepared statement
 assertResponse(
@@ -309,7 +317,9 @@ resp = assertResponse(
         headers=dict(Authorization=USER_AUTHORIZATION_HEADER)
     )
 )
-assert(len(resp.json().get("transactions")) == 1)
+
+if len(resp.json().get("transactions")) != 1:
+    fail("Unexpected number of transactions; should be 1")
 
 nexus.terminate()
 sandbox.terminate()

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

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