aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2017-06-05 00:19:19 +0200
committerMaximilian Hils <git@maximilianhils.com>2017-06-05 00:19:52 +0200
commit9b59937e12556dcce6729f62cab5705d956d4c03 (patch)
tree8e2e3e7a526281b4e994d95791132a119c55215c /test
parentf3c2123bc7c43d1f923f847e62ecdf749c7960c3 (diff)
downloadmitmproxy-9b59937e12556dcce6729f62cab5705d956d4c03.tar.gz
mitmproxy-9b59937e12556dcce6729f62cab5705d956d4c03.tar.bz2
mitmproxy-9b59937e12556dcce6729f62cab5705d956d4c03.zip
always pretend to have a tty in tests
Diffstat (limited to 'test')
-rw-r--r--test/mitmproxy/tools/console/test_master.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/mitmproxy/tools/console/test_master.py b/test/mitmproxy/tools/console/test_master.py
index c87c9e83..7732483f 100644
--- a/test/mitmproxy/tools/console/test_master.py
+++ b/test/mitmproxy/tools/console/test_master.py
@@ -1,3 +1,5 @@
+import pytest
+
from mitmproxy.test import tflow
from mitmproxy.test import tutils
from mitmproxy.tools import console
@@ -6,6 +8,13 @@ from mitmproxy import options
from mitmproxy.tools.console import common
from ... import tservers
import urwid
+from unittest import mock
+
+
+@pytest.fixture(scope="module", autouse=True)
+def definitely_atty():
+ with mock.patch("sys.stdout.isatty", lambda: True):
+ yield
def test_format_keyvals():