gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libeufin] 01/02: match against full expected JSON


From: gnunet
Subject: [libeufin] 01/02: match against full expected JSON
Date: Thu, 03 Dec 2020 16:35:18 +0100

This is an automated email from the git hooks/post-receive script.

ms pushed a commit to branch master
in repository libeufin.

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

    match against full expected JSON
---
 integration-tests/camt53-gls-style-0.json | 119 ++++++++++++++++++++++++++++++
 integration-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
new file mode 100644
index 0000000..3b42ff9
--- /dev/null
+++ 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
index 32b5598..262c85f 100755
--- 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)

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]