diff options
author | lymanZerga11 <lymanZerga11@users.noreply.github.com> | 2017-02-14 21:17:18 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-14 21:17:18 +0800 |
commit | d30ef7ee3eb1bef28fc5bddba72ad6ba0cb54660 (patch) | |
tree | 172eb42ea9ad9ab0ff15598b25f5d7315fa001c8 /test | |
parent | a52d8c1dabf668ed758d4a7af28f4e371cbf31e7 (diff) | |
download | mitmproxy-d30ef7ee3eb1bef28fc5bddba72ad6ba0cb54660.tar.gz mitmproxy-d30ef7ee3eb1bef28fc5bddba72ad6ba0cb54660.tar.bz2 mitmproxy-d30ef7ee3eb1bef28fc5bddba72ad6ba0cb54660.zip |
Update test_flowlist.py
Diffstat (limited to 'test')
-rw-r--r-- | test/mitmproxy/console/test_flowlist.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/test/mitmproxy/console/test_flowlist.py b/test/mitmproxy/console/test_flowlist.py index 16c5ad07..3bd92e41 100644 --- a/test/mitmproxy/console/test_flowlist.py +++ b/test/mitmproxy/console/test_flowlist.py @@ -3,8 +3,7 @@ from mitmproxy.tools import console from mitmproxy import proxy from mitmproxy import options from .. import tservers -import pytest -from unittest import mock as Mock +from unittest import mock class TestFlowlist(tservers.MasterTest): @@ -17,6 +16,6 @@ class TestFlowlist(tservers.MasterTest): def test_new_request(self): m = self.mkmaster() x = flowlist.FlowListBox(m) - with Mock.patch('mitmproxy.tools.console.signals.status_message.send') as mock: + with mock.patch('mitmproxy.tools.console.signals.status_message.send') as mock_thing: x.new_request("nonexistent url", "GET") - mock.assert_called_once_with(message = "Invalid URL: No hostname given") + mock_thing.assert_called_once_with(message="Invalid URL: No hostname given") |