From 3634343f46362dbaaf7aefc586162b0ba19f2499 Mon Sep 17 00:00:00 2001 From: liwenguo123 Date: Sun, 15 May 2016 17:16:47 -0400 Subject: [PATCH] Update transaction_tests.py --- tests/transaction_tests.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tests/transaction_tests.py b/tests/transaction_tests.py index 62caa8a..1385d1c 100644 --- a/tests/transaction_tests.py +++ b/tests/transaction_tests.py @@ -3,6 +3,11 @@ from transaction import Transaction -def test_type(): - t = Transaction(5) - assert_is_instance(t, Transaction, "correct type") \ No newline at end of file +def test_type(amount): + t = Transaction(amount) + assert_is_instance(t, Transaction, "correct type") + +def test_type_call(): + amounts = [5, 1000, -200, None] + for amount in amounts: + test_type(amount)