def test_deposit_negative(self): test_account1 = Savings(100, 1000000) self.assertEquals(test_account1.deposit(-1), None)
def test_deposit_string(self): test_account1 = Savings(100, 1000000) with self.assertRaises(TypeError): test_account1.deposit("blahblah")
def test_deposit_none(self): test_account1 = Savings(100, 1000000) with self.assertRaises(TypeError): test_account1.deposit()
def test_deposit(self): test_account1 = Savings(100, 1000000) test_account1.deposit(100) self.assertEqual(test_account1.balance, 200 + 100 * 0.02)