LU03.L02 - Bankkonto

test_BankAccount.py
from BankAccount import BankAccount
 
 
def test_get_money_less_than_saldo_returns_expected_money():
    account = BankAccount(400)
    value = account.get_money(300)
    assert value == 300 and account.balance == 100
 
 
def test_get_money_with_more_than_saldo_returns_nothing():
    account = BankAccount(400)
    value = account.get_money(600)
    assert value == 0 and account.balance == 400

Daniel Fahrni, Marcel Suter

  • modul/m450/learningunits/lu03/loesungen/bankaccount.txt
  • Last modified: 2024/02/07 06:45
  • by msuter