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