-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathwallet_test.py
39 lines (27 loc) · 933 Bytes
/
wallet_test.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import unittest
from wallet_app import *
class WalletUnitTest(unittest.TestCase):
@classmethod
def setUpClass(cls):
"""Set up for class"""
print("setUpClass")
print("==========")
@classmethod
def tearDownClass(cls):
"""Tear down for class"""
print("==========")
print("tearDownClass")
def setUp(self):
"""Set up for test"""
print("Set up for [" + self.shortDescription() + "]")
def tearDown(self):
"""Tear down for test"""
print("Tear down for [" + self.shortDescription() + "]")
print("")
def test_spend(self):
"""test of spend method"""
transaction = Transaction('10', 'test','test')
account = Account('test', '100')
self.assertEqual(wallet.spend(account.account_value, transaction.transaction_value), '90.00', "not equal")
if __name__ == '__main__':
unittest.main()