Fixed terminal test.

This commit is contained in:
Michael Lazar
2016-03-03 18:32:32 -08:00
parent ffbd6c1dfd
commit ad61bb6a9d

View File

@@ -315,12 +315,13 @@ def test_open_pager(terminal, stdscr):
data = "Hello World!"
def side_effect(*_, stdin=None):
def side_effect(args, stdin=None):
assert stdin is not None
raise OSError
with mock.patch('subprocess.Popen', autospec=True) as Popen, \
mock.patch.dict('os.environ', {'PAGER': 'fake'}):
Popen.return_value.stdin = mock.Mock()
terminal.open_pager(data)
assert Popen.called