[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libeufin] branch master updated: Camt parsing tests.
From: |
gnunet |
Subject: |
[libeufin] branch master updated: Camt parsing tests. |
Date: |
Mon, 07 Dec 2020 19:59:31 +0100 |
This is an automated email from the git hooks/post-receive script.
ms pushed a commit to branch master
in repository libeufin.
The following commit(s) were added to refs/heads/master by this push:
new 0d98056 Camt parsing tests.
0d98056 is described below
commit 0d98056099e00df3ba5554660d95b3b8a1d121a0
Author: MS <ms@taler.net>
AuthorDate: Mon Dec 7 19:57:48 2020 +0100
Camt parsing tests.
Testing the stricter policy of not ingesting messages
that are incompatible with the current parsing policy.
---
integration-tests/camt53-gls-style-1.json | 3 +
integration-tests/camt53-gls-style-1.xml | 114 ++++++++++++++++++++++++++++++
integration-tests/tests.py | 21 ++++++
3 files changed, 138 insertions(+)
diff --git a/integration-tests/camt53-gls-style-1.json
b/integration-tests/camt53-gls-style-1.json
new file mode 100644
index 0000000..1825322
--- /dev/null
+++ b/integration-tests/camt53-gls-style-1.json
@@ -0,0 +1,3 @@
+{
+ "transactions" : []
+}
diff --git a/integration-tests/camt53-gls-style-1.xml
b/integration-tests/camt53-gls-style-1.xml
new file mode 100644
index 0000000..9d6e8f8
--- /dev/null
+++ b/integration-tests/camt53-gls-style-1.xml
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="UTF-8" ?><Document
xmlns="urn:iso:std:iso:20022:tech:xsd:camt.053.001.02"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:iso:std:iso:20022:tech:xsd:camt.053.001.02
camt.053.001.02.xsd">
+ <BkToCstmrStmt>
+ <GrpHdr>
+ <MsgId>053D2020-05-29T23:41:27.0N200000011</MsgId>
+ <CreDtTm>2020-05-29T23:41:21.0+02:00</CreDtTm>
+ <MsgPgntn>
+ <PgNb>001</PgNb>
+ <LastPgInd>true</LastPgInd>
+ </MsgPgntn>
+ </GrpHdr>
+ <Stmt>
+ <Id>4967C532020052923412775014049078800</Id>
+ <ElctrncSeqNb>200000011</ElctrncSeqNb>
+ <LglSeqNb>005</LglSeqNb>
+ <CreDtTm>2020-05-29T23:41:21.0+02:00</CreDtTm>
+ <Acct>
+ <Id>
+ <IBAN>GB33BUKB20201555555555</IBAN>
+ </Id>
+ <Ccy>EUR</Ccy>
+ <Ownr>
+ <Nm>Taler Exchange</Nm>
+ </Ownr>
+ <Svcr>
+ <FinInstnId>
+ <BIC>GENODEM1GLS</BIC>
+ <Nm>GLS Gemeinschaftsbank eG</Nm>
+ <Othr>
+ <Id>DE 124090847</Id>
+ <Issr>UmsStId</Issr>
+ </Othr>
+ </FinInstnId>
+ </Svcr>
+ </Acct>
+ <Bal>
+ <Tp>
+ <CdOrPrtry>
+ <Cd>PRCD</Cd>
+ </CdOrPrtry>
+ </Tp>
+ <Amt Ccy="EUR">202.01</Amt>
+ <CdtDbtInd>CRDT</CdtDbtInd>
+ <Dt>
+ <Dt>2020-05-29</Dt>
+ </Dt>
+ </Bal>
+ <Bal>
+ <Tp>
+ <CdOrPrtry>
+ <Cd>CLBD</Cd>
+ </CdOrPrtry>
+ </Tp>
+ <Amt Ccy="EUR">199.34</Amt>
+ <CdtDbtInd>CRDT</CdtDbtInd>
+ <Dt>
+ <Dt>2020-05-29</Dt>
+ </Dt>
+ </Bal>
+ <Ntry>
+ <Amt Ccy="EUR">9.96</Amt>
+ <CdtDbtInd>DBIT</CdtDbtInd>
+ <Sts>BOOK</Sts>
+ <BookgDt>
+ <Dt>2020-05-29</Dt>
+ </BookgDt>
+ <ValDt>
+ <Dt>2020-05-31</Dt>
+ </ValDt>
+ <AcctSvcrRef>2020052921190458000</AcctSvcrRef>
+ <BkTxCd>
+ <Prtry>
+ <Cd>NMSC+805+00905</Cd>
+ <Issr>DK</Issr>
+ </Prtry>
+ </BkTxCd>
+ <NtryDtls>
+ <TxDtls>
+ <AmtDtls>
+ <TxAmt>
+ <Amt Ccy="EUR">9.96</Amt>
+ </TxAmt>
+ </AmtDtls>
+ <BkTxCd>
+ <Prtry>
+ <Cd>NMSC+805+00905</Cd>
+ <Issr>DK</Issr>
+ </Prtry>
+ </BkTxCd>
+ <RmtInf>
+ <Ustrd>Makes the report unacceptable</Ustrd>
+ </RmtInf>
+ </TxDtls>
+ <TxDtls>
+ <AmtDtls>
+ <TxAmt>
+ <Amt Ccy="EUR">9.96</Amt>
+ </TxAmt>
+ </AmtDtls>
+ <BkTxCd>
+ <Prtry>
+ <Cd>NMSC+805+00905</Cd>
+ <Issr>DK</Issr>
+ </Prtry>
+ </BkTxCd>
+ <RmtInf>
+ <Ustrd>ABSCHLUSS PER 31.05.2020</Ustrd>
+ </RmtInf>
+ </TxDtls>
+ </NtryDtls>
+ <AddtlNtryInf>Abschluss</AddtlNtryInf>
+ </Ntry>
+ </Stmt>
+ </BkToCstmrStmt>
+</Document>
diff --git a/integration-tests/tests.py b/integration-tests/tests.py
index 0ed70f6..9a5f3f9 100755
--- a/integration-tests/tests.py
+++ b/integration-tests/tests.py
@@ -352,6 +352,27 @@ def test_double_connection_name():
[406] # expecting "406 Not acceptable"
)
+def test_ingestion_camt53_non_singleton():
+ with open("camt53-gls-style-1.xml") as f:
+ camt = f.read()
+ assertResponse(
+ post(
+ f"{N}/bank-accounts/{NEXUS_BANK_LABEL}/test-camt-ingestion/C53",
+ auth=NEXUS_AUTH,
+ data=camt
+ )
+ )
+ resp = assertResponse(
+ get(
+ f"{N}/bank-accounts/{NEXUS_BANK_LABEL}/transactions",
+ auth=NEXUS_AUTH
+ )
+ )
+ with open("camt53-gls-style-1.json") as f:
+ expected_txs = f.read()
+ assert not dd(resp.json(), json.loads(expected_txs), ignore_order=True)
+
+
def test_ingestion_camt53():
with open("camt53-gls-style-0.xml") as f:
camt = f.read()
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [libeufin] branch master updated: Camt parsing tests.,
gnunet <=