libeufin

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

commit db920d53ab54ece89e687ede40a0626f974065d6
parent edc04b5bd08bc8173cfad79ed60f294674ada4aa
Author: MS <ms@taler.net>
Date:   Thu,  3 Dec 2020 15:23:03 +0100

remove duplicate test

Diffstat:
Dintegration-tests/camt53-gls-style-1.xml | 132-------------------------------------------------------------------------------
Mintegration-tests/tests.py | 25+++++--------------------
2 files changed, 5 insertions(+), 152 deletions(-)

diff --git a/integration-tests/camt53-gls-style-1.xml b/integration-tests/camt53-gls-style-1.xml @@ -1,131 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<Document xmlns="urn:iso:std:iso:20022:tech:xsd:camt.053.001.04" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:iso:std:iso:20022:tech:xsd:camt.053.001.04 camt.053.001.04.xsd"> - <BkToCstmrStmt> - <GrpHdr> - <MsgId>C053201124181701</MsgId> - <CreDtTm>2020-11-24T18:17:26+01:00</CreDtTm> - <MsgRcpt> - <Id> - <OrgId> - <AnyBIC>UBSWCHZHCCS</AnyBIC> - </OrgId> - </Id> - </MsgRcpt> - <MsgPgntn> - <PgNb>1</PgNb> - <LastPgInd>true</LastPgInd> - </MsgPgntn> - <AddtlInf>SPS/1.7</AddtlInf> - </GrpHdr> - <Stmt> - <Id>0002011241817001</Id> - <ElctrncSeqNb>1</ElctrncSeqNb> - <CreDtTm>2020-11-24T18:17:26+01:00</CreDtTm> - <FrToDt> - <FrDtTm>2020-11-24T00:00:00+01:00</FrDtTm> - <ToDtTm>2020-11-24T24:00:00+01:00</ToDtTm> - </FrToDt> - <Acct> - <Id> - <IBAN>CH2801234000123456789</IBAN> - </Id> - <Ccy>CHF</Ccy> - <Ownr> - <Nm>UNIFITS GmbH</Nm> - </Ownr> - <Svcr> - <FinInstnId> - <BICFI>UBSWCHZH80A</BICFI> - <Nm>UBS SWITZERLAND AG</Nm> - <Othr> - <Id>CHE-116.303.292 MWST</Id> - <Issr>VAT-ID</Issr> - </Othr> - </FinInstnId> - </Svcr> - </Acct> - <Bal> - <Tp> - <CdOrPrtry> - <Cd>OPBD</Cd> - </CdOrPrtry> - </Tp> - <Amt Ccy="CHF">10000</Amt> - <CdtDbtInd>CRDT</CdtDbtInd> - <Dt> - <Dt>2020-11-24</Dt> - </Dt> - </Bal> - <Bal> - <Tp> - <CdOrPrtry> - <Cd>CLBD</Cd> - </CdOrPrtry> - </Tp> - <Amt Ccy="CHF">9975.7</Amt> - <CdtDbtInd>CRDT</CdtDbtInd> - <Dt> - <Dt>2020-11-24</Dt> - </Dt> - </Bal> - <Bal> - <Tp> - <CdOrPrtry> - <Cd>CLAV</Cd> - </CdOrPrtry> - </Tp> - <Amt Ccy="CHF">9975.7</Amt> - <CdtDbtInd>CRDT</CdtDbtInd> - <Dt> - <Dt>2020-11-24</Dt> - </Dt> - </Bal> - <Ntry> - <Amt Ccy="CHF">24.3</Amt> - <CdtDbtInd>DBIT</CdtDbtInd> - <Sts>BOOK</Sts> - <BookgDt> - <Dt>2020-11-24</Dt> - </BookgDt> - <ValDt> - <Dt>2020-11-24</Dt> - </ValDt> - <AcctSvcrRef>ACSR201124181701</AcctSvcrRef> - <BkTxCd> - <Domn> - <Cd>PMNT</Cd> - <Fmly> - <Cd>ICDT</Cd> - <SubFmlyCd>DMCT</SubFmlyCd> - </Fmly> - </Domn> - <Prtry> - <Cd>Z24</Cd> - </Prtry> - </BkTxCd> - <AddtlInfInd> - <MsgNmId>camt.054.001.04</MsgNmId> - <MsgId>C054201124181701</MsgId> - </AddtlInfInd> - <AmtDtls> - <InstdAmt> - <Amt Ccy="CHF">24.3</Amt> - </InstdAmt> - <TxAmt> - <Amt Ccy="CHF">24.3</Amt> - </TxAmt> - </AmtDtls> - <NtryDtls> - <Btch> - <MsgId>UXC20112400010</MsgId> - <PmtInfId>UXC20112400010PI00001</PmtInfId> - <NbOfTxs>2</NbOfTxs> - <TtlAmt Ccy="CHF">24.3</TtlAmt> - <CdtDbtInd>DBIT</CdtDbtInd> - </Btch> - </NtryDtls> - <AddtlNtryInf>Order</AddtlNtryInf> - </Ntry> - </Stmt> - </BkToCstmrStmt> -</Document> -\ No newline at end of file diff --git a/integration-tests/tests.py b/integration-tests/tests.py @@ -340,29 +340,14 @@ def test_double_connection_name(): def test_ingestion_camt53(): with open("camt53-gls-style-0.xml") as f: - camt_0 = f.read() + camt = f.read() assertResponse( post( f"{N}/bank-accounts/{NEXUS_BANK_LABEL}/test-camt-ingestion/C53", auth=NEXUS_AUTH, - data=camt_0 + data=camt ) ) - with open("camt53-gls-style-1.xml") as f: - camt_1 = f.read() - assertResponse( - post( - f"{N}/bank-accounts/{NEXUS_BANK_LABEL}/test-camt-ingestion/C53", - auth=NEXUS_AUTH, - data=camt_1 - ) - ) - - resp = assertResponse( - get( - f"{N}/bank-accounts/{NEXUS_BANK_LABEL}/transactions", - auth=NEXUS_AUTH - ) - ) - - assert(len(resp.json()["transactions"]) == 5) + assert(len(resp.json()["transactions"]) == 4) + for t in resp.json()["transactions"]: + print(t["amount"])