Merge pull request #2375 from mhils/isatty

Always pretend to have a tty in tests
This commit is contained in:
Maximilian Hils 2017-06-06 12:59:30 +02:00 committed by GitHub
commit 60f2d37dd8

View File

@ -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():