mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-30 03:14:22 +00:00
Update test_flowlist.py
This commit is contained in:
parent
c622e4a649
commit
df8a5aa9be
@ -1,20 +1,20 @@
|
||||
import mitmproxy.tools.console.flowlist as flowlist
|
||||
from mitmproxy.test import tutils
|
||||
from mitmproxy.test import tflow
|
||||
from mitmproxy.tools import console
|
||||
from mitmproxy import proxy
|
||||
from mitmproxy import options
|
||||
from mitmproxy.tools.console import common
|
||||
from .. import mastertest
|
||||
import pytest
|
||||
from unittest import mock
|
||||
|
||||
|
||||
class ScriptError(Exception):
|
||||
pass
|
||||
|
||||
|
||||
def mock_add_log(message):
|
||||
raise ScriptError(message)
|
||||
|
||||
|
||||
class TestFlowlist(mastertest.MasterTest):
|
||||
def mkmaster(self, **opts):
|
||||
if "verbosity" not in opts:
|
||||
@ -29,5 +29,3 @@ class TestFlowlist(mastertest.MasterTest):
|
||||
with pytest.raises(ScriptError) as e:
|
||||
x.new_request("nonexistent url", "GET")
|
||||
assert "Invalid URL" in str(e)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user