aboutsummaryrefslogtreecommitdiffstats
path: root/test/mitmproxy/addons/test_core.py
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@corte.si>2018-04-23 11:05:58 +1200
committerAldo Cortesi <aldo@nullcube.com>2018-04-23 19:16:33 +1200
commit95e690ba31db9cb35eaa7e22ecebbe06ea8e2044 (patch)
tree62f5a3ea58ef5a2b2f39b092df97fcd5b6d9f16d /test/mitmproxy/addons/test_core.py
parent0ba10b61090274a1f2ca70a8fb1d68830cb44607 (diff)
downloadmitmproxy-95e690ba31db9cb35eaa7e22ecebbe06ea8e2044.tar.gz
mitmproxy-95e690ba31db9cb35eaa7e22ecebbe06ea8e2044.tar.bz2
mitmproxy-95e690ba31db9cb35eaa7e22ecebbe06ea8e2044.zip
test: shift test_data out of our public API
Diffstat (limited to 'test/mitmproxy/addons/test_core.py')
-rw-r--r--test/mitmproxy/addons/test_core.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/test/mitmproxy/addons/test_core.py b/test/mitmproxy/addons/test_core.py
index 3c674b3f..59875c2b 100644
--- a/test/mitmproxy/addons/test_core.py
+++ b/test/mitmproxy/addons/test_core.py
@@ -3,7 +3,6 @@ from unittest import mock
from mitmproxy.addons import core
from mitmproxy.test import taddons
from mitmproxy.test import tflow
-from mitmproxy.test import tutils
from mitmproxy import exceptions
import pytest
@@ -198,13 +197,13 @@ def test_validation_modes(m):
tctx.configure(sa, mode = "reverse:")
-def test_client_certs():
+def test_client_certs(tdata):
sa = core.Core()
with taddons.context() as tctx:
# Folders should work.
- tctx.configure(sa, client_certs = tutils.test_data.path("mitmproxy/data/clientcert"))
+ tctx.configure(sa, client_certs = tdata.path("mitmproxy/data/clientcert"))
# Files, too.
- tctx.configure(sa, client_certs = tutils.test_data.path("mitmproxy/data/clientcert/client.pem"))
+ tctx.configure(sa, client_certs = tdata.path("mitmproxy/data/clientcert/client.pem"))
with pytest.raises(exceptions.OptionsError, match="certificate path does not exist"):
tctx.configure(sa, client_certs = "invalid")