Пример #1
0
def test_make_wrong_add_money_parameter():
    """
    Payment with negative amount
    """
    test_wallet = Wallet(10)
    test_wallet.add_money(-1)
    assert test_wallet.balance() == 10
Пример #2
0
def test_add_money():
    """
    Add minimum of funds to wallet
    """
    test_wallet = Wallet(10)
    test_wallet.add_money(1)
    assert test_wallet.balance() == 11
Пример #3
0
def test_make_loop_payment(count):
    """
    Loop of transactions
    """
    test_wallet = Wallet(10)
    for i in range(count):
        test_wallet.add_money(1)
    assert test_wallet.balance() == 10 + count