[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libeufin] branch master updated: checks
From: |
gnunet |
Subject: |
[libeufin] branch master updated: checks |
Date: |
Thu, 29 Oct 2020 17:01:21 +0100 |
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 d7878cb checks
d7878cb is described below
commit d7878cb5d05c76959ca97f8fca79ea93afe0d02b
Author: MS <ms@taler.net>
AuthorDate: Thu Oct 29 17:01:12 2020 +0100
checks
---
integration-tests/json_checks.py | 15 +++++++++++++++
integration-tests/test-ebics-highlevel.py | 8 ++++----
2 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/integration-tests/json_checks.py b/integration-tests/json_checks.py
index 282d79b..a0a54bc 100644
--- a/integration-tests/json_checks.py
+++ b/integration-tests/json_checks.py
@@ -20,6 +20,21 @@ def checkPreparePayment(json):
)
return c.check(json)
+def checkPreparedPaymentResponse(json):
+ c = T(F("uuid"))
+ return c.check(json)
+
+def checkTransaction(json):
+ c = T(
+ F("account"),
+ F("counterpartIban"),
+ F("counterpartBic"),
+ F("counterpartName"),
+ F("amount"),
+ F("date"),
+ F("subject")
+ )
+
def checkNewEbicsConnection(json):
c = T(
F("source"),
diff --git a/integration-tests/test-ebics-highlevel.py
b/integration-tests/test-ebics-highlevel.py
index 3fa47ba..bb49e31 100755
--- a/integration-tests/test-ebics-highlevel.py
+++ b/integration-tests/test-ebics-highlevel.py
@@ -7,7 +7,7 @@ import hashlib
import base64
from util import startNexus, startSandbox, assertResponse
-from json_checks import checkNewEbicsConnection, checkPreparePayment
+from json_checks import checkNewEbicsConnection, checkPreparePayment,
checkTransaction, checkPreparedPaymentResponse
# Steps implemented in this test.
#
@@ -181,9 +181,8 @@ resp = assertResponse(
headers=dict(Authorization=USER_AUTHORIZATION_HEADER),
)
)
+checkPreparedPaymentResponse(resp)
PREPARED_PAYMENT_UUID = resp.json().get("uuid")
-if PREPARED_PAYMENT_UUID == None:
- fail("Payment UUID not received")
# 5.b, submit payment initiation
assertResponse(
@@ -210,9 +209,10 @@ resp = assertResponse(
)
transactions = resp.json().get("transactions")
-
if len(transactions) != 1:
print(transactions)
fail(f"Unexpected number of transactions ({len(transactions)}); should be
1")
+checkTransactions(transactions[0])
+
print("Test passed!")
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [libeufin] branch master updated: checks,
gnunet <=