libeufin

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

commit 081f9a4f105c6f2855a382df09dab5eea4bf4fb9
parent f24e223a17be232485bed5696f1a3800d023f4ef
Author: MS <ms@taler.net>
Date:   Thu, 14 May 2020 20:44:34 +0200

adapt test runner to new API

Diffstat:
Mintegration-tests/test-ebics-new.py | 28+++++++++++++---------------
Mnexus/src/main/kotlin/tech/libeufin/nexus/JSON.kt | 14--------------
Mutil/src/main/kotlin/strings.kt | 2+-
3 files changed, 14 insertions(+), 30 deletions(-)

diff --git a/integration-tests/test-ebics-new.py b/integration-tests/test-ebics-new.py @@ -267,27 +267,25 @@ resp = assertResponse( ) assert(len(resp.json().get("transactions")) == 0) -nexus.terminate() -sandbox.terminate() -exit(44) - -#5.a +#5.a, prepare a payment assertResponse( post( - "http://localhost:5001/users/{}/prepare-payment".format(USERNAME), + "http://localhost:5001/bank-accounts/{}/prepared-payments".format(BANK_ACCOUNT_LABEL), json=dict( - creditorIban="FR7630006000011234567890189", - creditorBic="AGRIFRPP", - creditorName="Jacques La Fayette", - debitorIban=SUBSCRIBER_IBAN, - debitorBic=SUBSCRIBER_BIC, - debitorName=SUBSCRIBER_NAME, - subject="integration test", - sum=1 - ) + iban="FR7630006000011234567890189", + bic="AGRIFRPP", + name="Jacques La Fayette", + subject="integration test", + amount="EUR:1" + ), + headers=dict(Authorization=USER_AUTHORIZATION_HEADER) ) ) +nexus.terminate() +sandbox.terminate() +exit(44) + #5.b assertResponse( post("http://localhost:5001/ebics/execute-payments") diff --git a/nexus/src/main/kotlin/tech/libeufin/nexus/JSON.kt b/nexus/src/main/kotlin/tech/libeufin/nexus/JSON.kt @@ -222,17 +222,3 @@ data class Pain001Data( - - - - - - - - - - - - - - diff --git a/util/src/main/kotlin/strings.kt b/util/src/main/kotlin/strings.kt @@ -79,7 +79,7 @@ data class AmountWithCurrency( fun parseAmount(amount: String): AmountWithCurrency { val match = Regex("([A-Z]+):([0-9]+(\\.[0-9]+)?)").find(amount) ?: throw - UtilError(HttpStatusCode.BadRequest, "invalid payto URI ($amount)") + UtilError(HttpStatusCode.BadRequest, "invalid amount: $amount") val (currency, number) = match.destructured return AmountWithCurrency(currency, Amount(number)) } \ No newline at end of file