libeufin

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

commit ff4e128f26d448961d69115b9c464d64905e82fb
parent d645176e21e4b5ea4db262e14fd661631a44979b
Author: MS <ms@taler.net>
Date:   Thu,  3 Dec 2020 16:34:18 +0100

match against full expected JSON

Diffstat:
Aintegration-tests/camt53-gls-style-0.json | 119+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mintegration-tests/tests.py | 5++++-
2 files changed, 123 insertions(+), 1 deletion(-)

diff --git a/integration-tests/camt53-gls-style-0.json b/integration-tests/camt53-gls-style-0.json @@ -0,0 +1,119 @@ +{ + "transactions" : [ { + "amount" : "EUR:2.35", + "creditDebitIndicator" : "DBIT", + "status" : "BOOK", + "bankTransactionCode" : "PMNT-RRCT-ESCT", + "valueDate" : "2020-05-29", + "bookingDate" : "2020-05-29", + "accountServicerRef" : "2020052912023838000", + "batches" : [ { + "batchTransactions" : [ { + "amount" : "EUR:2.35", + "creditDebitIndicator" : "DBIT", + "details" : { + "debtor" : { + "name" : "TALER WALLET USER" + }, + "debtorAccount" : { + "iban" : "GB33BUKB20201555555555" + }, + "debtorAgent" : { + "bic" : "BYLADEM1WOR" + }, + "creditor" : { + "name" : "Taler Exchange" + }, + "creditorAccount" : { + "iban" : "DE00000000000000000000" + }, + "endToEndId" : "NOTPROVIDED", + "unstructuredRemittanceInformation" : "Überweisung Test Nr. 1 Referenz-Nummer 0FMRBH8FZYYMSQ2RHTYYGK2BV33JVSW6MTYCV7Y833GVNXFDYK10" + } + } ] + } ] + }, { + "amount" : "EUR:3.15", + "creditDebitIndicator" : "CRDT", + "status" : "BOOK", + "bankTransactionCode" : "PMNT-RRCT-ESCT", + "valueDate" : "2020-05-29", + "bookingDate" : "2020-05-29", + "accountServicerRef" : "2020052913163282000", + "batches" : [ { + "batchTransactions" : [ { + "amount" : "EUR:3.15", + "creditDebitIndicator" : "CRDT", + "details" : { + "debtor" : { + "name" : "TALER WALLET USER" + }, + "debtorAccount" : { + "iban" : "DE00000000000000000000" + }, + "debtorAgent" : { + "bic" : "BYLADEM1WOR" + }, + "creditor" : { + "name" : "Taler Exchange" + }, + "creditorAccount" : { + "iban" : "DE00000000000000000000" + }, + "endToEndId" : "NOTPROVIDED", + "unstructuredRemittanceInformation" : "Überweisung Mai, Test Nr. 2" + } + } ] + } ] + }, { + "amount" : "EUR:1.79", + "creditDebitIndicator" : "CRDT", + "status" : "BOOK", + "bankTransactionCode" : "PMNT-RRCT-ESCT", + "valueDate" : "2020-05-29", + "bookingDate" : "2020-05-29", + "accountServicerRef" : "2020052913183564000", + "batches" : [ { + "batchTransactions" : [ { + "amount" : "EUR:1.79", + "creditDebitIndicator" : "CRDT", + "details" : { + "debtor" : { + "name" : "TALER EXCHANGE" + }, + "debtorAccount" : { + "iban" : "DE00000000000000000000" + }, + "debtorAgent" : { + "bic" : "BYLADEM1WOR" + }, + "creditor" : { + "name" : "Taler Merchant" + }, + "creditorAccount" : { + "iban" : "DE00000000000000000000" + }, + "endToEndId" : "NOTPROVIDED", + "unstructuredRemittanceInformation" : "Überweisung Mai, Test Nr. 3" + } + } ] + } ] + }, { + "amount" : "EUR:9.96", + "creditDebitIndicator" : "DBIT", + "status" : "BOOK", + "bankTransactionCode" : "ACMT-OPCL-ACCC", + "valueDate" : "2020-05-31", + "bookingDate" : "2020-05-29", + "accountServicerRef" : "2020052921190458000", + "batches" : [ { + "batchTransactions" : [ { + "amount" : "EUR:9.96", + "creditDebitIndicator" : "DBIT", + "details" : { + "unstructuredRemittanceInformation" : "ABSCHLUSS PER 31.05.2020" + } + } ] + } ] + } ] +} diff --git a/integration-tests/tests.py b/integration-tests/tests.py @@ -2,6 +2,7 @@ import pytest import json +from deepdiff import DeepDiff as dd from subprocess import check_call from requests import post, get, auth from time import sleep @@ -354,4 +355,6 @@ def test_ingestion_camt53(): auth=NEXUS_AUTH ) ) - assert(len(resp.json()["transactions"]) == 4) + with open("camt53-gls-style-0.json") as f: + expected_txs = f.read() + assert not dd(resp.json(), json.loads(expected_txs), ignore_order=True)