示例#1
0
 def test_modify_balance(self):
     account = Account('1', '1234', 100)
     account.add_balance(20)
     account.sub_balance(80)
     self.assertEqual(account.balance(), 40)
示例#2
0
 def test_modify_balance_return_error(self):
     with self.assertRaises(AccountWithoutBalanceError):
         account = Account('1', '1234', 100)
         self.assertIsNone(account.sub_balance(120))