Пример #1
0
 def test_withdraw(self):
     """should add the withdraw amount from the account balance and return updated balance"""
     account = BankAccount()
     account.deposit(1000)
     self.assertEqual(account.withdraw(500), 500)
def test_deposit_increases_balance_correctly():
    bank_account = BankAccount(account_number=12, amount=1300)
    assert_equal(bank_account.balance, 1300)
    bank_account.deposit(amount=300)
    assert_equal(bank_account.balance, 1600)
Пример #3
0
 def test_deposit(self):
     """should add the deposit the amount to the account balance and return updated balance"""
     account = BankAccount()
     self.assertEqual(account.deposit(1000), 1000)
def test_deposit_increases_balance_correctly():
    bank_account = BankAccount(account_number=12, amount=1300)
    assert_equal(bank_account.balance, 1300)
    bank_account.deposit(amount=300)
    assert_equal(bank_account.balance, 1600)