aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorThomas Kriechbaumer <thomas@kriechbaumer.name>2019-09-28 16:53:24 +0200
committerThomas Kriechbaumer <thomas@kriechbaumer.name>2019-09-28 17:37:43 +0200
commit53cb5bf40f40cef2c5b4e05e7be42949146a3f58 (patch)
tree05b8af891b30226befdc7361e9e66ec728f5c2f2 /test
parentf6405abda27e0154ca3eff1f0522e72976a37bf8 (diff)
downloadmitmproxy-53cb5bf40f40cef2c5b4e05e7be42949146a3f58.tar.gz
mitmproxy-53cb5bf40f40cef2c5b4e05e7be42949146a3f58.tar.bz2
mitmproxy-53cb5bf40f40cef2c5b4e05e7be42949146a3f58.zip
bump deps
Diffstat (limited to 'test')
-rw-r--r--test/full_coverage_plugin.py8
-rw-r--r--test/mitmproxy/net/test_tls.py6
2 files changed, 7 insertions, 7 deletions
diff --git a/test/full_coverage_plugin.py b/test/full_coverage_plugin.py
index ec30a9f9..f99dc7ab 100644
--- a/test/full_coverage_plugin.py
+++ b/test/full_coverage_plugin.py
@@ -55,7 +55,7 @@ def pytest_runtestloop(session):
yield
return
- cov = pytest.config.pluginmanager.getplugin("_cov").cov_controller.cov
+ cov = session.config.pluginmanager.getplugin("_cov").cov_controller.cov
if os.name == 'nt':
cov.exclude('pragma: windows no cover')
@@ -68,7 +68,7 @@ def pytest_runtestloop(session):
yield
- coverage_values = dict([(name, 0) for name in pytest.config.option.full_cov])
+ coverage_values = dict([(name, 0) for name in session.config.option.full_cov])
prefix = os.getcwd()
@@ -92,7 +92,7 @@ def pytest_runtestloop(session):
coverage_passed = False
-def pytest_terminal_summary(terminalreporter, exitstatus):
+def pytest_terminal_summary(terminalreporter, exitstatus, config):
global enable_coverage
global coverage_values
global coverage_passed
@@ -119,7 +119,7 @@ def pytest_terminal_summary(terminalreporter, exitstatus):
terminalreporter.write(msg, **markup)
else:
msg = 'SUCCESS: Full test coverage reached in modules and files:\n'
- msg += '{}\n\n'.format('\n'.join(pytest.config.option.full_cov))
+ msg += '{}\n\n'.format('\n'.join(config.option.full_cov))
terminalreporter.write(msg, green=True)
msg = '\nExcluded files:\n'
diff --git a/test/mitmproxy/net/test_tls.py b/test/mitmproxy/net/test_tls.py
index 489bf89f..68e67dbe 100644
--- a/test/mitmproxy/net/test_tls.py
+++ b/test/mitmproxy/net/test_tls.py
@@ -87,13 +87,13 @@ def test_get_client_hello():
rfile = io.BufferedReader(io.BytesIO(
FULL_CLIENT_HELLO_NO_EXTENSIONS[:30]
))
- with pytest.raises(exceptions.TlsProtocolException, message="Unexpected EOF"):
+ with pytest.raises(exceptions.TlsProtocolException, match="Unexpected EOF"):
tls.get_client_hello(rfile)
rfile = io.BufferedReader(io.BytesIO(
b"GET /"
))
- with pytest.raises(exceptions.TlsProtocolException, message="Expected TLS record"):
+ with pytest.raises(exceptions.TlsProtocolException, match="Expected TLS record"):
tls.get_client_hello(rfile)
@@ -153,5 +153,5 @@ class TestClientHello:
b"\x01\x00\x00\x03" + # handshake header
b"foo"
))
- with pytest.raises(exceptions.TlsProtocolException, message='Cannot parse Client Hello'):
+ with pytest.raises(exceptions.TlsProtocolException, match='Cannot parse Client Hello'):
tls.ClientHello.from_file(rfile)