diff options
Diffstat (limited to 'test/mitmproxy/tools/console/test_pathedit.py')
-rw-r--r-- | test/mitmproxy/tools/console/test_pathedit.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/mitmproxy/tools/console/test_pathedit.py b/test/mitmproxy/tools/console/test_pathedit.py index bd064e5f..b9f51f5a 100644 --- a/test/mitmproxy/tools/console/test_pathedit.py +++ b/test/mitmproxy/tools/console/test_pathedit.py @@ -1,10 +1,10 @@ import os from os.path import normpath +from unittest import mock + from mitmproxy.tools.console import pathedit from mitmproxy.test import tutils -from unittest.mock import patch - class TestPathCompleter: @@ -56,8 +56,8 @@ class TestPathEdit: pe = pathedit.PathEdit("", "") - with patch('urwid.widget.Edit.get_edit_text') as get_text, \ - patch('urwid.widget.Edit.set_edit_text') as set_text: + with mock.patch('urwid.widget.Edit.get_edit_text') as get_text, \ + mock.patch('urwid.widget.Edit.set_edit_text') as set_text: cd = os.path.normpath(tutils.test_data.path("mitmproxy/completion")) get_text.return_value = os.path.join(cd, "a") |