aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2017-06-06 12:59:30 +0200
committerGitHub <noreply@github.com>2017-06-06 12:59:30 +0200
commit60f2d37dd8acf3b9bbee1e8e8d3544de626735de (patch)
tree5e27547ae2d55607a1dce70ca6154cce8e08893c
parent02232b51494a7045fdb96878234ddf92b549bf72 (diff)
parent9b59937e12556dcce6729f62cab5705d956d4c03 (diff)
downloadmitmproxy-60f2d37dd8acf3b9bbee1e8e8d3544de626735de.tar.gz
mitmproxy-60f2d37dd8acf3b9bbee1e8e8d3544de626735de.tar.bz2
mitmproxy-60f2d37dd8acf3b9bbee1e8e8d3544de626735de.zip
Merge pull request #2375 from mhils/isatty
Always pretend to have a tty in tests
-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():