bank_account_test.py
import pytest
from bank_account import BankAccount
 
 
@pytest.fixture()
def testee(starting_amoount=400):
    return BankAccount(starting_amoount)
 
 
def test_get_money_with_less_than_saldo_returns_expected_money(testee):
    assert testee.get_money(300) == 300
    assert testee.saldo == 100
 
 
def test_get_money_with_more_than_saldo_returns_nothing(testee):
    assert testee.get_money(600) == 0
    assert testee.saldo == 400
  • modul/m320/learningunits/lu90/loesungen/lu4-aufgabe_4.txt
  • Last modified: 2023/11/13 08:56
  • by 127.0.0.1