diff options
author | MS <ms@taler.net> | 2020-12-07 18:31:30 +0100 |
---|---|---|
committer | MS <ms@taler.net> | 2020-12-07 18:31:30 +0100 |
commit | a34d37333d3b82ceec87443555d1b8dd7e81f913 (patch) | |
tree | 05accfb2416df3bf9a38342d33c9b2c3843ed74e | |
parent | e7092cc3a09e649181cc631a06133530e22f0afa (diff) | |
download | libeufin-tests-a34d37333d3b82ceec87443555d1b8dd7e81f913.tar.gz libeufin-tests-a34d37333d3b82ceec87443555d1b8dd7e81f913.tar.bz2 libeufin-tests-a34d37333d3b82ceec87443555d1b8dd7e81f913.zip |
Checks of incompatible samples gone.
A sample is 'incompatible' when it doesn't comply
with the parser policy. Right now, every Camt.053
must only contain singleton money movements.
-rwxr-xr-x | checks.py | 29 |
1 files changed, 0 insertions, 29 deletions
@@ -33,38 +33,9 @@ def assert_json_equal(json1, json2): diff = DeepDiff(json1, json2, ignore_order=True, report_repetition=True) assert len(diff.keys()) == 0 -def test_camt53_example1(): - # This document has non-singleton money movements. It is then - # not acceptable by the Nexus parser. - parsed = call_parser("./samples/camt53_example1.xml") - entries = parsed["reports"][0]["entries"] - assert(len(entries) == 2) - # This check ensures that the non-singleton money movements didn't - # end in the ingested Camt report. - assert(len(entries[0]["batches"][0]["batchTransactions"]) == 0) - - # Although this money movement is a singleton, it lacks important - # information like unstr. rem. and counterpart IBAN. It should validate - # but not show up in a Taler facade (and not even get reimbursed) - assert(len(entries[1]["batches"][0]["batchTransactions"]) == 1) - -def test_camt53_example2(): - # This document is linked to a c54 report, and it doesn't - # mention any money movement. It is then not acceptable by - # the Nexus parser. - parsed = call_parser("./samples/camt53_example2.xml") - entries = parsed["reports"][0]["entries"] - assert(len(entries) == 1) - - # This check ensures that *zero* sub-transactions got included - # in the parsed report. - assert(len(entries[0]["batches"][0]["batchTransactions"]) == 0) - def test_camt53_example3(): - # This document is acceptable. 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) |