def test_confirm_neither(monkeypatch): monkeypatch.setattr(sys, 'stdin', StringIO("t\ny\n")) assert confirm("Hello how are you?")
def test_confirm_no(monkeypatch): monkeypatch.setattr(sys, 'stdin', StringIO("n\n")) assert not confirm("Hello how are you?")