Esempio n. 1
0
    def test_withdraw_negative(self):
        test_account1 = Account(100, 1000000)

        self.assertEquals(test_account1.withdraw(-100), None)
Esempio n. 2
0
    def test_withdraw_no_amount(self):
        test_account1 = Account(100, 1000000)

        with self.assertRaises(TypeError):
            test_account1.withdraw()
Esempio n. 3
0
    def test_withdraw_string(self):
        test_account1 = Account(100, 1000000)

        with self.assertRaises(TypeError):
            test_account1.withdraw('hello')
Esempio n. 4
0
    def test_withdraw(self):
        test_account1 = Account(100, 1000000)
        test_account1.withdraw(50)

        self.assertEquals(test_account1.balance, 45)