mirror of
https://github.com/brain-tec/account_ebics.git
synced 2026-11-06 10:00:39 +00:00
[IMP] account_ebics - Add unit tests
Add 97 tests: - account_ebics: order numbers, camt and CFONB split per account, journal lookup, duplicate statements, download and upload wizards, key initialisation (INI/HIA/HPB), passphrase change, admin orders. - account_ebics_batch: scheduled import, import log, reprocess. - account_ebics_payment_order / account_ebics_batch_payment: upload of the payment file and link to the payment document. - account_ebics_statement_import_test (new, test-only, not to install in production): installs the OCA camt and CFONB parsers in CI and runs the end-to-end statement import. The bank is simulated by patching ebics.xfer._setup_client, or the fintech client classes for the key initialisation; keys, certificates and the INI letter are real, created in a temporary directory.
This commit is contained in:
1 parent
ed0bf5d6ae
commit
a1fc381121
50 files changed
+2075
-5
No files matched your search
@@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Document xmlns="urn:iso:std:iso:20022:tech:xsd:camt.053.001.02"><BkToCstmrStmt><GrpHdr><MsgId>MSG-TEST-0001</MsgId><CreDtTm>2026-10-13T22:00:00</CreDtTm></GrpHdr><Stmt><Id>SUFFIX-STMT-1</Id><ElctrncSeqNb>1</ElctrncSeqNb><CreDtTm>2026-10-13T22:00:00</CreDtTm><Acct><Id><Othr><Id>0010000005EUR</Id></Othr></Id><Ccy>EUR</Ccy></Acct><Bal><Tp><CdOrPrtry><Cd>OPBD</Cd></CdOrPrtry></Tp><Amt Ccy="EUR">10.00</Amt><CdtDbtInd>CRDT</CdtDbtInd><Dt><Dt>2026-10-13</Dt></Dt></Bal><Bal><Tp><CdOrPrtry><Cd>CLBD</Cd></CdOrPrtry></Tp><Amt Ccy="EUR">15.00</Amt><CdtDbtInd>CRDT</CdtDbtInd><Dt><Dt>2026-10-13</Dt></Dt></Bal><Ntry><NtryRef>SUFFIX-0001</NtryRef><Amt Ccy="EUR">5.00</Amt><CdtDbtInd>CRDT</CdtDbtInd><Sts><Cd>BOOK</Cd></Sts><BookgDt><Dt>2026-10-13</Dt></BookgDt><ValDt><Dt>2026-10-13</Dt></ValDt><AcctSvcrRef>SUFFIX-0001</AcctSvcrRef><BkTxCd><Domn><Cd>PMNT</Cd><Fmly><Cd>ICDT</Cd><SubFmlyCd>ESCT</SubFmlyCd></Fmly></Domn><Prtry><Cd>NTRF+116</Cd><Issr>DK</Issr></Prtry></BkTxCd><NtryDtls><TxDtls><Refs><AcctSvcrRef>SUFFIX-0001</AcctSvcrRef></Refs><Amt Ccy="EUR">5.00</Amt><RmtInf><Ustrd>Rho refund</Ustrd></RmtInf></TxDtls></NtryDtls></Ntry></Stmt></BkToCstmrStmt></Document>
|
||||
@@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Document xmlns="urn:iso:std:iso:20022:tech:xsd:camt.053.001.08"><BkToCstmrStmt><GrpHdr><MsgId>MSG-TEST-0001</MsgId><CreDtTm>2026-10-13T22:00:00</CreDtTm></GrpHdr><Stmt><Id>HVB-STMT-0001</Id><ElctrncSeqNb>1</ElctrncSeqNb><CreDtTm>2026-10-13T22:00:00</CreDtTm><Acct><Id><IBAN>DE54793200750010000001</IBAN></Id><Ccy>EUR</Ccy></Acct><Bal><Tp><CdOrPrtry><Cd>OPBD</Cd></CdOrPrtry></Tp><Amt Ccy="EUR">5000.00</Amt><CdtDbtInd>CRDT</CdtDbtInd><Dt><Dt>2026-10-13</Dt></Dt></Bal><Bal><Tp><CdOrPrtry><Cd>CLBD</Cd></CdOrPrtry></Tp><Amt Ccy="EUR">3992.50</Amt><CdtDbtInd>CRDT</CdtDbtInd><Dt><Dt>2026-10-13</Dt></Dt></Bal><Bal><Tp><CdOrPrtry><Cd>CLAV</Cd></CdOrPrtry></Tp><Amt Ccy="EUR">3992.50</Amt><CdtDbtInd>CRDT</CdtDbtInd><Dt><Dt>2026-10-13</Dt></Dt></Bal><Ntry><NtryRef>HVB-0001</NtryRef><Amt Ccy="EUR">150.00</Amt><CdtDbtInd>DBIT</CdtDbtInd><Sts><Cd>BOOK</Cd></Sts><BookgDt><Dt>2026-10-13</Dt></BookgDt><ValDt><Dt>2026-10-13</Dt></ValDt><AcctSvcrRef>HVB-0001</AcctSvcrRef><BkTxCd><Domn><Cd>PMNT</Cd><Fmly><Cd>ICDT</Cd><SubFmlyCd>ESCT</SubFmlyCd></Fmly></Domn><Prtry><Cd>NTRF+116</Cd><Issr>DK</Issr></Prtry></BkTxCd><NtryDtls><TxDtls><Refs><AcctSvcrRef>HVB-0001</AcctSvcrRef><EndToEndId>E2E-LAMBDA-118</EndToEndId></Refs><Amt Ccy="EUR">150.00</Amt><RmtInf><Ustrd>Rechnung 2026-118 Lambda GmbH</Ustrd></RmtInf></TxDtls></NtryDtls></Ntry><Ntry><NtryRef>HVB-0002</NtryRef><Amt Ccy="EUR">857.50</Amt><CdtDbtInd>DBIT</CdtDbtInd><Sts><Cd>BOOK</Cd></Sts><BookgDt><Dt>2026-10-13</Dt></BookgDt><ValDt><Dt>2026-10-13</Dt></ValDt><AcctSvcrRef>HVB-0002</AcctSvcrRef><BkTxCd><Domn><Cd>PMNT</Cd><Fmly><Cd>ICDT</Cd><SubFmlyCd>ESCT</SubFmlyCd></Fmly></Domn><Prtry><Cd>NTRF+116</Cd><Issr>DK</Issr></Prtry></BkTxCd><NtryDtls><TxDtls><Refs><AcctSvcrRef>HVB-0002</AcctSvcrRef></Refs><Amt Ccy="EUR">857.50</Amt><AmtDtls><InstdAmt><Amt Ccy="USD">1000.00</Amt></InstdAmt></AmtDtls><Chrgs><TtlChrgsAndTaxAmt Ccy="EUR">12.50</TtlChrgsAndTaxAmt></Chrgs><RmtInf><Ustrd>Zahlung USD Mu Inc</Ustrd></RmtInf></TxDtls></NtryDtls></Ntry></Stmt></BkToCstmrStmt></Document>
|
||||
@@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Document xmlns="urn:iso:std:iso:20022:tech:xsd:camt.053.001.02"><BkToCstmrStmt><GrpHdr><MsgId>MSG-TEST-0001</MsgId><CreDtTm>2026-10-13T22:00:00</CreDtTm></GrpHdr><Stmt><Id>MULTI-STMT-1</Id><ElctrncSeqNb>1</ElctrncSeqNb><CreDtTm>2026-10-13T22:00:00</CreDtTm><Acct><Id><IBAN>DE69370400440010000003</IBAN></Id><Ccy>EUR</Ccy></Acct><Bal><Tp><CdOrPrtry><Cd>OPBD</Cd></CdOrPrtry></Tp><Amt Ccy="EUR">100.00</Amt><CdtDbtInd>CRDT</CdtDbtInd><Dt><Dt>2026-10-13</Dt></Dt></Bal><Bal><Tp><CdOrPrtry><Cd>CLBD</Cd></CdOrPrtry></Tp><Amt Ccy="EUR">130.00</Amt><CdtDbtInd>CRDT</CdtDbtInd><Dt><Dt>2026-10-13</Dt></Dt></Bal><Ntry><NtryRef>MULTI-0001</NtryRef><Amt Ccy="EUR">30.00</Amt><CdtDbtInd>CRDT</CdtDbtInd><Sts><Cd>BOOK</Cd></Sts><BookgDt><Dt>2026-10-13</Dt></BookgDt><ValDt><Dt>2026-10-13</Dt></ValDt><AcctSvcrRef>MULTI-0001</AcctSvcrRef><BkTxCd><Domn><Cd>PMNT</Cd><Fmly><Cd>ICDT</Cd><SubFmlyCd>ESCT</SubFmlyCd></Fmly></Domn><Prtry><Cd>NTRF+116</Cd><Issr>DK</Issr></Prtry></BkTxCd><NtryDtls><TxDtls><Refs><AcctSvcrRef>MULTI-0001</AcctSvcrRef></Refs><Amt Ccy="EUR">30.00</Amt><RmtInf><Ustrd>Omikron payment</Ustrd></RmtInf></TxDtls></NtryDtls></Ntry></Stmt><Stmt><Id>MULTI-STMT-2</Id><ElctrncSeqNb>1</ElctrncSeqNb><CreDtTm>2026-10-13T22:00:00</CreDtTm><Acct><Id><IBAN>DE42370400440010000004</IBAN></Id><Ccy>EUR</Ccy></Acct><Bal><Tp><CdOrPrtry><Cd>OPBD</Cd></CdOrPrtry></Tp><Amt Ccy="EUR">200.00</Amt><CdtDbtInd>CRDT</CdtDbtInd><Dt><Dt>2026-10-13</Dt></Dt></Bal><Bal><Tp><CdOrPrtry><Cd>CLBD</Cd></CdOrPrtry></Tp><Amt Ccy="EUR">180.00</Amt><CdtDbtInd>CRDT</CdtDbtInd><Dt><Dt>2026-10-13</Dt></Dt></Bal><Ntry><NtryRef>MULTI-0002</NtryRef><Amt Ccy="EUR">20.00</Amt><CdtDbtInd>DBIT</CdtDbtInd><Sts><Cd>BOOK</Cd></Sts><BookgDt><Dt>2026-10-13</Dt></BookgDt><ValDt><Dt>2026-10-13</Dt></ValDt><AcctSvcrRef>MULTI-0002</AcctSvcrRef><BkTxCd><Domn><Cd>PMNT</Cd><Fmly><Cd>ICDT</Cd><SubFmlyCd>ESCT</SubFmlyCd></Fmly></Domn><Prtry><Cd>NTRF+116</Cd><Issr>DK</Issr></Prtry></BkTxCd><NtryDtls><TxDtls><Refs><AcctSvcrRef>MULTI-0002</AcctSvcrRef></Refs><Amt Ccy="EUR">20.00</Amt><RmtInf><Ustrd>Pi fee</Ustrd></RmtInf></TxDtls></NtryDtls></Ntry></Stmt></BkToCstmrStmt></Document>
|
||||
@@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Document xmlns="urn:iso:std:iso:20022:tech:xsd:camt.053.001.08"><BkToCstmrStmt><GrpHdr><MsgId>MSG-TEST-0001</MsgId><CreDtTm>2026-10-13T22:00:00</CreDtTm></GrpHdr><Stmt><Id>NOACC-STMT-1</Id><ElctrncSeqNb>1</ElctrncSeqNb><CreDtTm>2026-10-13T22:00:00</CreDtTm><Acct><Ccy>EUR</Ccy></Acct><Bal><Tp><CdOrPrtry><Cd>OPBD</Cd></CdOrPrtry></Tp><Amt Ccy="EUR">1.00</Amt><CdtDbtInd>CRDT</CdtDbtInd><Dt><Dt>2026-10-13</Dt></Dt></Bal><Bal><Tp><CdOrPrtry><Cd>CLBD</Cd></CdOrPrtry></Tp><Amt Ccy="EUR">2.00</Amt><CdtDbtInd>CRDT</CdtDbtInd><Dt><Dt>2026-10-13</Dt></Dt></Bal><Ntry><NtryRef>NOACC-0001</NtryRef><Amt Ccy="EUR">1.00</Amt><CdtDbtInd>CRDT</CdtDbtInd><Sts><Cd>BOOK</Cd></Sts><BookgDt><Dt>2026-10-13</Dt></BookgDt><ValDt><Dt>2026-10-13</Dt></ValDt><AcctSvcrRef>NOACC-0001</AcctSvcrRef><BkTxCd><Domn><Cd>PMNT</Cd><Fmly><Cd>ICDT</Cd><SubFmlyCd>ESCT</SubFmlyCd></Fmly></Domn><Prtry><Cd>NTRF+116</Cd><Issr>DK</Issr></Prtry></BkTxCd><NtryDtls><TxDtls><Refs><AcctSvcrRef>NOACC-0001</AcctSvcrRef></Refs><Amt Ccy="EUR">1.00</Amt><RmtInf><Ustrd>Sigma</Ustrd></RmtInf></TxDtls></NtryDtls></Ntry></Stmt></BkToCstmrStmt></Document>
|
||||
@@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Document xmlns="urn:iso:std:iso:20022:tech:xsd:camt.053.001.08"><BkToCstmrStmt><GrpHdr><MsgId>MSG-TEST-0001</MsgId><CreDtTm>2026-10-13T22:00:00</CreDtTm></GrpHdr><Stmt><Id>EMPTY-STMT-1</Id><ElctrncSeqNb>1</ElctrncSeqNb><CreDtTm>2026-10-13T22:00:00</CreDtTm><Acct><Id><IBAN>DE52305500000010000002</IBAN></Id><Ccy>EUR</Ccy></Acct><Bal><Tp><CdOrPrtry><Cd>OPBD</Cd></CdOrPrtry></Tp><Amt Ccy="EUR">720.00</Amt><CdtDbtInd>CRDT</CdtDbtInd><Dt><Dt>2026-10-13</Dt></Dt></Bal><Bal><Tp><CdOrPrtry><Cd>CLBD</Cd></CdOrPrtry></Tp><Amt Ccy="EUR">720.00</Amt><CdtDbtInd>CRDT</CdtDbtInd><Dt><Dt>2026-10-13</Dt></Dt></Bal></Stmt></BkToCstmrStmt></Document>
|
||||
@@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Document xmlns="urn:iso:std:iso:20022:tech:xsd:camt.053.001.08"><BkToCstmrStmt><GrpHdr><MsgId>MSG-TEST-0001</MsgId><CreDtTm>2026-10-13T22:00:00</CreDtTm></GrpHdr><Stmt><Id>SPK-STMT-0001</Id><ElctrncSeqNb>1</ElctrncSeqNb><CreDtTm>2026-10-13T22:00:00</CreDtTm><Acct><Id><IBAN>DE52305500000010000002</IBAN></Id><Ccy>EUR</Ccy></Acct><Bal><Tp><CdOrPrtry><Cd>OPBD</Cd></CdOrPrtry></Tp><Amt Ccy="EUR">720.00</Amt><CdtDbtInd>CRDT</CdtDbtInd><Dt><Dt>2026-10-13</Dt></Dt></Bal><Bal><Tp><CdOrPrtry><Cd>CLBD</Cd></CdOrPrtry></Tp><Amt Ccy="EUR">1065.00</Amt><CdtDbtInd>CRDT</CdtDbtInd><Dt><Dt>2026-10-13</Dt></Dt></Bal><Ntry><NtryRef>SPK-0001</NtryRef><Amt Ccy="EUR">400.00</Amt><CdtDbtInd>CRDT</CdtDbtInd><Sts><Cd>BOOK</Cd></Sts><BookgDt><Dt>2026-10-13</Dt></BookgDt><ValDt><Dt>2026-10-13</Dt></ValDt><AcctSvcrRef>SPK-0001</AcctSvcrRef><BkTxCd><Domn><Cd>PMNT</Cd><Fmly><Cd>ICDT</Cd><SubFmlyCd>ESCT</SubFmlyCd></Fmly></Domn><Prtry><Cd>NTRF+116</Cd><Issr>DK</Issr></Prtry></BkTxCd><NtryDtls><TxDtls><Refs><AcctSvcrRef>SPK-0001</AcctSvcrRef></Refs><Amt Ccy="EUR">400.00</Amt><RmtInf><Ustrd>Gutschrift Nu KG</Ustrd></RmtInf></TxDtls></NtryDtls></Ntry><Ntry><NtryRef>SPK-0002</NtryRef><Amt Ccy="EUR">55.00</Amt><CdtDbtInd>DBIT</CdtDbtInd><Sts><Cd>BOOK</Cd></Sts><BookgDt><Dt>2026-10-13</Dt></BookgDt><ValDt><Dt>2026-10-13</Dt></ValDt><AcctSvcrRef>SPK-0002</AcctSvcrRef><BkTxCd><Domn><Cd>PMNT</Cd><Fmly><Cd>ICDT</Cd><SubFmlyCd>ESCT</SubFmlyCd></Fmly></Domn><Prtry><Cd>NTRF+116</Cd><Issr>DK</Issr></Prtry></BkTxCd><NtryDtls><TxDtls><Refs><AcctSvcrRef>SPK-0002</AcctSvcrRef></Refs><Amt Ccy="EUR">55.00</Amt><RmtInf><Ustrd>Lastschrift Xi Versicherung</Ustrd></RmtInf></TxDtls></NtryDtls></Ntry></Stmt></BkToCstmrStmt></Document>
|
||||
@@ -0,0 +1 @@
|
||||
0115589 29701EUR2 10000000101 131026 0000000015000{
|
||||
@@ -0,0 +1,10 @@
|
||||
0117906 00032EUR2 40000000401 131026** COMPTE COURANT 0000000000100{
|
||||
0717906 00032EUR2 40000000401 131026--------------------------------------------------0000000000100{
|
||||
0117906 00032EUR2 40000000402 131026** COMPTE EPARGNE 0000000000200{
|
||||
0717906 00032EUR2 40000000402 131026--------------------------------------------------0000000000200{
|
||||
0117906 00032EUR2 40000000403 131026 0000000000300{
|
||||
0717906 00032EUR2 40000000403 131026 0000000000300{
|
||||
0117906 00032EUR2 40000000404 131026 0000000040000{
|
||||
0417906000000032EUR2 4000000040405131026 131026VIR ETA SA 0000000 0000000015000{
|
||||
0417906000000032EUR2 4000000040405131026 131026PRLV THETA ASSURANCES 0000000 0000000002100}
|
||||
0717906 00032EUR2 40000000404 131026 0000000052900{
|
||||
@@ -0,0 +1,14 @@
|
||||
0113306 00001EUR2 20000000201 131026 0000000084000{
|
||||
0413306000000001EUR2 2000000020105131026 131026VIR SEPA RECU GAMMA SARL 0000000 0000000006400{
|
||||
0513306000000001EUR2 2000000020105131026 NBEGAMMA SARL
|
||||
0513306000000001EUR2 2000000020105131026 LCCFACT 99812
|
||||
0513306000000001EUR2 2000000020105131026 REFE2E-GAMMA-1
|
||||
0413306000000001EUR2 2000000020105131026 131026PRLV SEPA DELTA ENERGIE 0000000 0000000001325N
|
||||
0513306000000001EUR2 2000000020105131026 NPYDELTA ENERGIE
|
||||
0513306000000001EUR2 2000000020105131026 RUMRUM-DELTA-0042
|
||||
0713306 00001EUR2 20000000201 131026 0000000089074E
|
||||
0113306 00001EUR2 20000000202 131026 0000000012345{
|
||||
0713306 00001EUR2 20000000202 131026 0000000012345{
|
||||
0113306 00001EUR2 20000000203 131026 0000000000500{
|
||||
0413306000000001EUR2 2000000020305131026 131026FRAIS TENUE DE COMPTE 0000000 0000000000099}
|
||||
0713306 00001EUR2 20000000203 131026 0000000000401{
|
||||
@@ -0,0 +1,14 @@
|
||||
0130087 33100EUR2 50000000501 131026 0000000009900{
|
||||
0430087000033100EUR2 5000000050105131026 131026VIR SEPA IOTA DISTRIBUTION 0000000 0000000021500{
|
||||
0530087000033100EUR2 5000000050105131026 NOMIOTA DISTRIBUTION
|
||||
0530087000033100EUR2 5000000050105131026 RIB30087331005000000050199
|
||||
0530087000033100EUR2 5000000050105131026 IBEFR7630087331005000000050199
|
||||
0530087000033100EUR2 5000000050105131026 CBECMCIFRPP
|
||||
0530087000033100EUR2 5000000050105131026 LCCFACTURE 7731
|
||||
0530087000033100EUR2 5000000050105131026 RCNSALE
|
||||
0530087000033100EUR2 5000000050105131026 REFE2E-IOTA-7731
|
||||
0430087000033100EUR2 5000000050105131026 131026PRLV SEPA KAPPA TELECOM 0000000 0000000000499R
|
||||
0530087000033100EUR2 5000000050105131026 NPYKAPPA TELECOM
|
||||
0530087000033100EUR2 5000000050105131026 RUMRUM-KAPPA-1
|
||||
0530087000033100EUR2 5000000050105131026 LIBABONNEMENT
|
||||
0730087 33100EUR2 50000000501 131026 0000000030900A
|
||||
@@ -0,0 +1 @@
|
||||
0115589 29701EUR2 10000000101 131026 0000000015000{ 0715589 29701EUR2 10000000101 131026 0000000015000{
|
||||
@@ -0,0 +1 @@
|
||||
0130002 00456EUR2 30000000301 131026 0000000001000{ 0730002 00456EUR2 30000000301 131026 0000000001000{ 0130002 00456EUR2 30000000302 131026 0000000025000{ 0430002000000456EUR2 3000000030205131026 131026VIR SEPA EPSILON SAS 0000000 0000000007800{ 0530002000000456EUR2 3000000030205131026 LIBACOMPTE CHANTIER 12 0430002000000456EUR2 3000000030205131026 131026CB STATION ZETA 0000000 0000000000612} 0730002 00456EUR2 30000000302 131026 0000000032188{ 0130002 00456EUR2 30000000303 131026 0000000000000{ 0730002 00456EUR2 30000000303 131026 0000000000000{ 0130002 00456EUR2 30000000304 131026 0000000003200{ 0430002000000456EUR2 3000000030405131026 131026REMISE CHEQUES 0000000 0000000004500{ 0730002 00456EUR2 30000000304 131026 0000000007700{
|
||||
@@ -0,0 +1 @@
|
||||
0115589 29701EUR2 10000000101 131026 0000000015000{ 0415589000029701EUR2 1000000010105131026 131026PRLV SEPA FOURNISSEUR ALPHA 0000000 0000000002504} 0515589000029701EUR2 1000000010105131026 LIBFACTURE 2026-0412 0515589000029701EUR2 1000000010105131026 RCNREF ALPHA 77881 0415589000029701EUR2 1000000010105131026 131026VIR SEPA CLIENT BETA 0000000 0000000012000{ 0515589000029701EUR2 1000000010105131026 LCCCOMMANDE 5521 0715589 29701EUR2 10000000101 131026 0000000024496{
|
||||
@@ -0,0 +1 @@
|
||||
this is not an xml document
|
||||
@@ -0,0 +1,3 @@
|
||||
Kundenprotokoll (PTK)
|
||||
Auftragsart: C53 Auftragsnummer: A00T Teilnehmer: TESTUSER1
|
||||
Status: Auftrag erfolgreich verarbeitet
|
||||
Reference in new issue
Block a user