def test_account_deposit_negative_amount(self): account_number = 'A100' first_name = 'FIRST' last_name = 'LAST' balance = 100.00 a = Account(account_number, first_name, last_name, initial_balance=balance) with self.assertRaises(ValueError): conf_code = a.deposit(-100)
def test_account_deposit_ok(self): account_number = 'A100' first_name = 'FIRST' last_name = 'LAST' balance = 100.00 a = Account(account_number, first_name, last_name, initial_balance=balance) conf_code = a.deposit(100) self.assertEqual(200, a.balance) self.assertIn('D-', conf_code)