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
  • Zuletzt geändert: 2024/03/28 14:07
  • von 127.0.0.1