From ad61bb6a9dae3256c477bcdfcd36978b69f0c745 Mon Sep 17 00:00:00 2001 From: Michael Lazar Date: Thu, 3 Mar 2016 18:32:32 -0800 Subject: [PATCH] Fixed terminal test. --- tests/test_terminal.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_terminal.py b/tests/test_terminal.py index 39d5a7b..de6a07f 100644 --- a/tests/test_terminal.py +++ b/tests/test_terminal.py @@ -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