libeufin

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

commit c6cbdfe23727d6a6cce74ea18ae65db211781c5e
parent 668eb8ad8a92be7ff73c99653745a6bb5d6c2072
Author: MS <ms@taler.net>
Date:   Tue, 26 Jan 2021 16:22:56 +0100

test connection deletion

Diffstat:
Mintegration-tests/tests.py | 25+++++++++++++++++++++++++
1 file changed, 25 insertions(+), 0 deletions(-)

diff --git a/integration-tests/tests.py b/integration-tests/tests.py @@ -141,6 +141,31 @@ def test_change_password(): ) ) +def test_connection_deletion(): + resp = assertResponse( + get( + f"{PERSONA.nexus.base_url}/bank-connections", + auth=PERSONA.nexus.auth + ) + ) + connection = resp.json().get("bankConnections").pop() + assert PERSONA.nexus.bank_connection == connection.get("name") + + assertResponse( + post( + f"{PERSONA.nexus.base_url}/bank-connections/delete-connection", + json=dict(bankConnectionId=PERSONA.nexus.bank_connection), + auth=PERSONA.nexus.auth + ) + ) + resp = assertResponse( + get( + f"{PERSONA.nexus.base_url}/bank-connections", + auth=PERSONA.nexus.auth + ) + ) + assert len(resp.json().get("bankConnections")) == 0 + # Tests whether Nexus knows the imported bank account. def test_imported_account(): resp = assertResponse(