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