aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMS <ms@taler.net>2020-10-27 17:31:50 +0100
committerMS <ms@taler.net>2020-10-27 17:31:50 +0100
commiteb51193269d8cec1abfd89c266ba74753dd97e01 (patch)
tree45b5d9fa067701326d26afcbf04eb74074fd4cef
parente860dc89dd9f712e928573926cfd62b8769d08d1 (diff)
downloadlibeufin-eb51193269d8cec1abfd89c266ba74753dd97e01.tar.gz
libeufin-eb51193269d8cec1abfd89c266ba74753dd97e01.tar.bz2
libeufin-eb51193269d8cec1abfd89c266ba74753dd97e01.zip
checking payment preparation
-rw-r--r--integration-tests/json_checks.py10
-rwxr-xr-xintegration-tests/test-ebics-highlevel.py9
2 files changed, 15 insertions, 4 deletions
diff --git a/integration-tests/json_checks.py b/integration-tests/json_checks.py
index 03e3404d..282d79b7 100644
--- a/integration-tests/json_checks.py
+++ b/integration-tests/json_checks.py
@@ -10,6 +10,16 @@ def checkNewUserRequest(json):
c = T(F("username"), F("password"))
return c.check(json)
+def checkPreparePayment(json):
+ c = T(
+ F("iban"),
+ F("bic"),
+ F("name"),
+ F("subject"),
+ F("amount")
+ )
+ return c.check(json)
+
def checkNewEbicsConnection(json):
c = T(
F("source"),
diff --git a/integration-tests/test-ebics-highlevel.py b/integration-tests/test-ebics-highlevel.py
index 4d4f2933..3fa47bab 100755
--- a/integration-tests/test-ebics-highlevel.py
+++ b/integration-tests/test-ebics-highlevel.py
@@ -7,6 +7,7 @@ import hashlib
import base64
from util import startNexus, startSandbox, assertResponse
+from json_checks import checkNewEbicsConnection, checkPreparePayment
# Steps implemented in this test.
#
@@ -114,14 +115,14 @@ print("creating bank connection")
assertResponse(
post(
"http://localhost:5001/bank-connections",
- json=dict(
+ json=checkNewEbicsConnection(dict(
name="my-ebics",
source="new",
type="ebics",
data=dict(
ebicsURL=EBICS_URL, hostID=HOST_ID, partnerID=PARTNER_ID, userID=USER_ID
),
- ),
+ )),
headers=dict(Authorization=USER_AUTHORIZATION_HEADER),
)
)
@@ -170,13 +171,13 @@ resp = assertResponse(
"http://localhost:5001/bank-accounts/{}/payment-initiations".format(
BANK_ACCOUNT_LABEL
),
- json=dict(
+ json=checkPreparePayment(dict(
iban="FR7630006000011234567890189",
bic="AGRIFRPP",
name="Jacques La Fayette",
subject="integration test",
amount="EUR:1",
- ),
+ )),
headers=dict(Authorization=USER_AUTHORIZATION_HEADER),
)
)