libeufin

Integration and sandbox testing for FinTech APIs and data formats
Log | Files | Refs | Submodules | README | LICENSE

commit eb51193269d8cec1abfd89c266ba74753dd97e01
parent e860dc89dd9f712e928573926cfd62b8769d08d1
Author: MS <ms@taler.net>
Date:   Tue, 27 Oct 2020 17:31:50 +0100

checking payment preparation

Diffstat:
Mintegration-tests/json_checks.py | 10++++++++++
Mintegration-tests/test-ebics-highlevel.py | 9+++++----
2 files changed, 15 insertions(+), 4 deletions(-)

diff --git 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 @@ -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), ) )