コード例 #1
0
ファイル: Savings_test.py プロジェクト: jkeung/Banking_App
    def test_withdraw_negative(self):
        test_account1 = Savings(100, 1000000)

        self.assertEquals(test_account1.withdraw(-100), None)
コード例 #2
0
ファイル: Savings_test.py プロジェクト: jkeung/Banking_App
    def test_withdraw_string(self):
        test_account1 = Savings(100, 1000000)

        with self.assertRaises(TypeError):
            test_account1.withdraw("blah")
コード例 #3
0
ファイル: Savings_test.py プロジェクト: jkeung/Banking_App
    def test_withdraw_none(self):
        test_account1 = Savings(100, 1000000)

        with self.assertRaises(TypeError):
            test_account1.withdraw()
コード例 #4
0
ファイル: Savings_test.py プロジェクト: jkeung/Banking_App
    def test_withdraw(self):
        test_account1 = Savings(100, 1000000)
        test_account1.withdraw(50)

        self.assertEqual(test_account1.balance, 45)