merchant-frontend-examples

ZZZ: Inactive/Deprecated
Log | Files | Refs

commit 924a48725eb59e8a8331bf4efaee5b5c38efc48c
parent cffde32a08c441727d674ad463bf6137a521b239
Author: Marcello Stanisci <marcello.stanisci@inria.fr>
Date:   Mon, 20 Feb 2017 19:12:18 +0100

Testcase pytaler.

Diffstat:
MPython/Makefile | 3+++
MPython/pytaler/amounts.py | 4++++
2 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/Python/Makefile b/Python/Makefile @@ -1,2 +1,5 @@ all: pip3 install . --install-option="--prefix=$(TALER_PREFIX)" + +check: + python3 pytaler/tests.py diff --git a/Python/pytaler/amounts.py b/Python/pytaler/amounts.py @@ -28,6 +28,10 @@ def amount_sum(a1, a2): "currency": a1["currency"]} return ret +# True if a1 == a2 +def same_amount(a1, a2): + return a1["value"] == a2["value"] and a1["fraction"] == a2["fraction"] and a1["currency"] == a2["currency"] + # Computes a1 - a2 def amount_sub(a1, a2): assert(a1["currency"] == a2["currency"])