From 15c6daed2a3db171dd9428f58ceff50aba189e09 Mon Sep 17 00:00:00 2001 From: Michael Lazar Date: Thu, 3 Dec 2015 23:55:32 -0800 Subject: [PATCH] Fixed browser test. --- tests/test_terminal.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/test_terminal.py b/tests/test_terminal.py index 1b76e9a..3573d47 100644 --- a/tests/test_terminal.py +++ b/tests/test_terminal.py @@ -28,9 +28,14 @@ def test_terminal_properties(terminal, config): assert len(terminal.guilded) == 2 assert isinstance(terminal.guilded[0], six.text_type) - # DISPLAY isn't reliable on all systems so we no longer rely on it. terminal._display = None with mock.patch.dict('os.environ', {'DISPLAY': ''}): + assert terminal.display is False + + terminal._display = None + with mock.patch('rtv.terminal.sys') as sys, \ + mock.patch.dict('os.environ', {'DISPLAY': ''}): + sys.platform = 'darwin' assert terminal.display is True terminal._display = None