Esempio n. 1
0
	def testWithdrawalTransactionType(self):
		account = BankAccount(1)
		account.balance = 10
		account.withdraw(5)
		self.assertIsInstance(account.transactions[0],Transaction)
Esempio n. 2
0
	def testWithdrawalTransaction(self):
		account = BankAccount(1)
		account.balance = 10
		account.withdraw(5)
		self.assertEqual(len(account.transactions),1)
Esempio n. 3
0
	def testDecimalWithdraw(self):
		account = BankAccount(1)
		account.balance = 10
		account.withdraw(0.50)
		self.assertEqual(account.balance,9.50)
Esempio n. 4
0
	def testSmallWithdraw(self):
		account = BankAccount(1)
		account.balance = 10
		account.withdraw(0.001)
		self.assertEqual(account.balance,9.999)
Esempio n. 5
0
	def testIntegerWithdraw(self):
		account = BankAccount(1)
		account.balance = 10
		account.withdraw(5)
		self.assertEqual(account.balance,5)