libeufin

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

commit f03bc9690d220af4f021b5724e9bac96254d4082
parent 84d9bd2e85f3d401d52bb73f64379f2ac6456d36
Author: MS <ms@taler.net>
Date:   Tue, 30 Jun 2020 16:09:21 +0200

no need of loopback test

Diffstat:
Dintegration-tests/test-loopback-highlevel.py | 82-------------------------------------------------------------------------------
1 file changed, 0 insertions(+), 82 deletions(-)

diff --git a/integration-tests/test-loopback-highlevel.py b/integration-tests/test-loopback-highlevel.py @@ -1,82 +0,0 @@ -#!/usr/bin/env python3 - -from requests import post, get -from subprocess import call, Popen, PIPE -from time import sleep -import os -import socket -import hashlib -import base64 - -from util import startSandbox, startNexus - -# Steps implemented in this test. -# -# 0 Prepare nexus. -# -> (a) Make a Nexus user, (b) make a loopback bank connection -# associated to that user - -# Nexus user details -USERNAME = "person" -PASSWORD = "y" -USER_AUTHORIZATION_HEADER = "basic {}".format( - base64.b64encode(b"person:y").decode("utf-8") -) - -# Admin authentication -ADMIN_AUTHORIZATION_HEADER = "basic {}".format( - base64.b64encode(b"admin:x").decode("utf-8") -) - -BANK_ACCOUNT_LABEL = "savings" - -# Databases -NEXUS_DB="test-nexus.sqlite3" - -def fail(msg): - print(msg) - exit(1) - -def assertResponse(response): - if response.status_code != 200: - print("Test failed on URL: {}".format(response.url)) - # stdout/stderr from both services is A LOT of text. - # Confusing to dump all that to console. - print("Check nexus.log and sandbox.log, probably under /tmp") - exit(1) - # Allows for finer grained checks. - return response - -startNexus(NEXUS_DB) - -# 0.a, make a new nexus user. -assertResponse( - post( - "http://localhost:5001/users", - headers=dict(Authorization=ADMIN_AUTHORIZATION_HEADER), - json=dict(username=USERNAME, password=PASSWORD), - ) -) - -print("creating bank connection") - -# 0.b, make a ebics bank connection for the new user. -assertResponse( - post( - "http://localhost:5001/bank-connections", - json=dict( - name="my-loopback", - source="new", - type="loopback", - data=dict( - iban="myIBAN", - bic="myBIC", - ownerName="Account Holder Name", - nexusBankAccountId="my-bank-account" - ) - ), - headers=dict(Authorization=USER_AUTHORIZATION_HEADER), - ) -) - -print("Test passed!")