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