Esempio n. 1
0
def test_allowed_to_drive(capfd):
    allowed_driving('bob', 18)
    output = capfd.readouterr()[0].strip()
    assert output == 'bob is allowed to drive'

    allowed_driving('julian', 19)
    output = capfd.readouterr()[0].strip()
    assert output == 'julian is allowed to drive'
Esempio n. 2
0
def test_allowed_to_drive(capfd):
    allowed_driving("bob", 18)
    output = capfd.readouterr()[0].strip()
    assert output == "bob is allowed to drive"

    allowed_driving("julian", 19)
    output = capfd.readouterr()[0].strip()
    assert output == "julian is allowed to drive"
Esempio n. 3
0
def test_allowed_to_drive_other_name(capfd):
    allowed_driving('julian', 19)
    output = capfd.readouterr()[0].strip()
    assert output == 'julian is allowed to drive'

    test_allowed_to_drive()
    test_allowed_to_drive_other_name()
    test_not_allowed_to_drive()
Esempio n. 4
0
def test_not_allowed_to_drive(capfd):
    allowed_driving("tim", 17)
    output = capfd.readouterr()[0].strip()
    assert output == "tim is not allowed to drive"
Esempio n. 5
0
def test_allowed_to_drive_other_name(capfd):
    allowed_driving("julian", 19)
    output = capfd.readouterr()[0].strip()
    assert output == "julian is allowed to drive"
Esempio n. 6
0
def test_not_allowed_to_drive(capfd):
    allowed_driving('tim', 16)
    output = capfd.readouterr()[0].strip()
    assert output == 'tim is not allowed to drive'