always pretend to have a tty in tests

This commit is contained in:
Maximilian Hils 2017-06-05 00:19:19 +02:00
parent f3c2123bc7
commit 9b59937e12
1 changed files with 9 additions and 0 deletions

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