diff options
author | Torsten Grote <t@grobox.de> | 2020-07-24 11:09:30 -0300 |
---|---|---|
committer | Torsten Grote <t@grobox.de> | 2020-07-28 15:42:39 -0300 |
commit | 08c3209dbc06329b4566ddd8d1dd7ab1c7e28ed7 (patch) | |
tree | 794658b2b9dfc3a39d8e374feae7e03919742f63 /tests/__init__.py | |
parent | 503c35d5f5972551cffa1fecb8b7b463503cc662 (diff) | |
download | wallet-core-08c3209dbc06329b4566ddd8d1dd7ab1c7e28ed7.tar.xz |
Add CI config for Gitlab CI integration tests (bash and pytest)
Diffstat (limited to 'tests/__init__.py')
-rw-r--r-- | tests/__init__.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/__init__.py b/tests/__init__.py new file mode 100644 index 000000000..a01ed07c2 --- /dev/null +++ b/tests/__init__.py @@ -0,0 +1,14 @@ +from taler.util.amount import Amount + + +def check_single_balance(balances, available, pending_in="TESTKUDOS:0", pending_out="TESTKUDOS:0", + has_pending=False): + assert len(balances) == 1 + assert balances[0]["available"] == available + assert balances[0]["pendingIncoming"] == pending_in + assert balances[0]["pendingOutgoing"] == pending_out + assert balances[0]["hasPendingTransactions"] == has_pending + + +def json_to_amount(d): + return Amount(d["currency"], d["value"], d["fraction"]) |