[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libeufin] branch master updated (24e078e -> 85c067c)
From: |
gnunet |
Subject: |
[libeufin] branch master updated (24e078e -> 85c067c) |
Date: |
Thu, 21 Jan 2021 14:39:07 +0100 |
This is an automated email from the git hooks/post-receive script.
ms pushed a change to branch master
in repository libeufin.
from 24e078e restrict resource names, cleanup
new a9a89b8 check parsed with expected JSON
new ed681b7 gitignore
new 85c067c Integration tests harness.
The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.gitignore | 1 +
integration-tests/tests.py | 10 +++++++---
parsing-tests/checks.py | 15 +++++----------
3 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/.gitignore b/.gitignore
index 92a7808..c943cec 100644
--- a/.gitignore
+++ b/.gitignore
@@ -18,3 +18,4 @@ __pycache__
*.log
.DS_Store
*.mk
+util/src/main/resources/version.txt
diff --git a/integration-tests/tests.py b/integration-tests/tests.py
index e063c34..ed6cfd2 100755
--- a/integration-tests/tests.py
+++ b/integration-tests/tests.py
@@ -67,7 +67,7 @@ def prepareNexus():
assertResponse(
post(
f"{PERSONA.nexus.base_url}/users",
- auth=auth.HTTPBasicAuth("admin", "x"),
+ auth=auth.HTTPBasicAuth("adminx", "x"),
json=dict(username=PERSONA.nexus.username,
password=PERSONA.nexus.password),
)
)
@@ -118,8 +118,12 @@ dropNexusTables(DB)
startNexus(DB)
def setup_function():
- prepareSandbox()
- prepareNexus()
+ try:
+ prepareSandbox()
+ prepareNexus()
+ except Exception:
+ teardown_function()
+ pytest.xfail("Failed to setup this test")
def teardown_function():
dropSandboxTables(DB)
diff --git a/parsing-tests/checks.py b/parsing-tests/checks.py
index 537187d..47e2996 100755
--- a/parsing-tests/checks.py
+++ b/parsing-tests/checks.py
@@ -4,6 +4,7 @@ import os
import sys
import json
from subprocess import Popen, PIPE
+from deepdiff import DeepDiff
# return dict with parse-result.
def call_parser(xml_file):
@@ -30,16 +31,10 @@ def get_json_from_disk(json_file):
def test_dashed_subject():
parsed = call_parser("./samples/camt53_example_dashed_subject.xml")
- entries = parsed["reports"][0]["entries"]
- tx = entries[0]["batches"][0]["batchTransactions"][0]
- assert tx["details"]["unstructuredRemittanceInformation"] ==
"subject-with-dashes"
+ expected =
get_json_from_disk("./samples/camt53_example_dashed_subject.json")
+ assert not DeepDiff(parsed, expected)
def test_camt53_example3():
parsed = call_parser("./samples/camt53_example3.xml")
- entries = parsed["reports"][0]["entries"]
- # The following checks ensure that each money movement is a singleton.
- assert(len(entries) == 4)
- assert(len(entries[0]["batches"][0]["batchTransactions"]) == 1)
- assert(len(entries[1]["batches"][0]["batchTransactions"]) == 1)
- assert(len(entries[2]["batches"][0]["batchTransactions"]) == 1)
- assert(len(entries[3]["batches"][0]["batchTransactions"]) == 1)
+ expected = get_json_from_disk("./samples/camt53_example3.json")
+ assert not DeepDiff(parsed, expected)
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [libeufin] branch master updated (24e078e -> 85c067c),
gnunet <=