mitmproxy/test/mitmproxy/mock_urwid.py
Thomas Kriechbaumer 127c69c3ac nuke mock dependency
This is already included in Python 3.3+ as unittest.mock
2017-01-22 14:11:28 +01:00

12 lines
243 B
Python

import os
import sys
from unittest import mock
if os.name == "nt":
m = mock.Mock()
m.__version__ = "1.1.1"
m.Widget = mock.Mock
m.WidgetWrap = mock.Mock
sys.modules['urwid'] = m
sys.modules['urwid.util'] = mock.Mock()