mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-23 00:01:36 +00:00
Merge pull request #1323 from mhils/test-examples
Exclude harparser script on Python 3
This commit is contained in:
commit
c57c203037
@ -60,6 +60,12 @@ def start(context):
|
||||
suit your actual needs of HAR generation. As it will probably be
|
||||
necessary to cluster logs by IPs or reset them from time to time.
|
||||
"""
|
||||
if sys.version_info >= (3, 0):
|
||||
raise RuntimeError(
|
||||
"har_extractor.py does not work on Python 3. "
|
||||
"Please check out https://github.com/mitmproxy/mitmproxy/issues/1320 "
|
||||
"if you want to help making this work again."
|
||||
)
|
||||
context.dump_file = None
|
||||
if len(sys.argv) > 1:
|
||||
context.dump_file = sys.argv[1]
|
||||
|
@ -1,6 +1,7 @@
|
||||
import glob
|
||||
import json
|
||||
import os
|
||||
import sys
|
||||
from contextlib import contextmanager
|
||||
|
||||
from mitmproxy import script
|
||||
@ -133,6 +134,12 @@ def test_redirect_requests():
|
||||
|
||||
|
||||
def test_har_extractor():
|
||||
if sys.version_info >= (3, 0):
|
||||
with tutils.raises("does not work on Python 3"):
|
||||
with example("har_extractor.py -"):
|
||||
pass
|
||||
return
|
||||
|
||||
with tutils.raises(script.ScriptException):
|
||||
with example("har_extractor.py"):
|
||||
pass
|
||||
|
2
tox.ini
2
tox.ini
@ -16,7 +16,7 @@ commands =
|
||||
|
||||
[testenv:py35]
|
||||
setenv =
|
||||
TESTS = test/netlib test/pathod/ test/mitmproxy/script test/mitmproxy/test_contentview.py test/mitmproxy/test_custom_contentview.py test/mitmproxy/test_app.py test/mitmproxy/test_controller.py test/mitmproxy/test_fuzzing.py test/mitmproxy/test_script.py test/mitmproxy/test_web_app.py test/mitmproxy/test_utils.py test/mitmproxy/test_stateobject.py test/mitmproxy/test_cmdline.py test/mitmproxy/test_contrib_tnetstring.py test/mitmproxy/test_proxy.py test/mitmproxy/test_protocol_http1.py test/mitmproxy/test_platform_pf.py test/mitmproxy/test_server.py test/mitmproxy/test_filt.py test/mitmproxy/test_flow_export.py test/mitmproxy/test_web_master.py test/mitmproxy/test_flow_format_compat.py
|
||||
TESTS = test/netlib test/pathod/ test/mitmproxy/script test/mitmproxy/test_contentview.py test/mitmproxy/test_custom_contentview.py test/mitmproxy/test_app.py test/mitmproxy/test_controller.py test/mitmproxy/test_fuzzing.py test/mitmproxy/test_script.py test/mitmproxy/test_web_app.py test/mitmproxy/test_utils.py test/mitmproxy/test_stateobject.py test/mitmproxy/test_cmdline.py test/mitmproxy/test_contrib_tnetstring.py test/mitmproxy/test_proxy.py test/mitmproxy/test_protocol_http1.py test/mitmproxy/test_platform_pf.py test/mitmproxy/test_server.py test/mitmproxy/test_filt.py test/mitmproxy/test_flow_export.py test/mitmproxy/test_web_master.py test/mitmproxy/test_flow_format_compat.py test/mitmproxy/test_examples.py
|
||||
HOME = {envtmpdir}
|
||||
|
||||
[testenv:docs]
|
||||
|
Loading…
Reference in New Issue
Block a user