def test__between_100_and_200(capsys): with mock.patch('builtins.input', lambda x: 199): execute_app() captured = capsys.readouterr() price = 15000 assert "Your wedding will cost " + str( price) + " dollars\n" == captured.out
def test_t(capsys): with mock.patch('builtins.input', lambda x: 201): execute_app() captured = capsys.readouterr() price = 20000 "Your wedding will cost " + str(price) + " dollars\n" == captured.out
def test_between(capsys): with mock.patch('builtins.input', lambda x: 100): execute_app() captured = capsys.readouterr() assert "Buy me some coffee you cheap!\n" == captured.out
def test_for_less(capsys): with mock.patch('builtins.input', lambda x: 50): execute_app() captured = capsys.readouterr() assert "You are a poor guy, go away!\n" == captured.out
def test_for_more(stdin, capsys): with mock.patch('builtins.input', lambda x: 101): execute_app() captured = capsys.readouterr() assert "Give me your money!\n" == captured.out