aboutsummaryrefslogtreecommitdiffstats
path: root/test/mitmproxy/addons/test_replace.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/mitmproxy/addons/test_replace.py')
-rw-r--r--test/mitmproxy/addons/test_replace.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/mitmproxy/addons/test_replace.py b/test/mitmproxy/addons/test_replace.py
index 9002afb5..9c1f7f79 100644
--- a/test/mitmproxy/addons/test_replace.py
+++ b/test/mitmproxy/addons/test_replace.py
@@ -18,7 +18,7 @@ class TestReplace:
def test_configure(self):
r = replace.Replace()
- with taddons.context() as tctx:
+ with taddons.context(r) as tctx:
tctx.configure(r, replacements=["one/two/three"])
with pytest.raises(Exception, match="Invalid filter pattern"):
tctx.configure(r, replacements=["/~b/two/three"])
@@ -28,7 +28,7 @@ class TestReplace:
def test_simple(self):
r = replace.Replace()
- with taddons.context() as tctx:
+ with taddons.context(r) as tctx:
tctx.configure(
r,
replacements=[
@@ -48,7 +48,7 @@ class TestReplace:
def test_order(self):
r = replace.Replace()
- with taddons.context() as tctx:
+ with taddons.context(r) as tctx:
tctx.configure(
r,
replacements=[
@@ -67,7 +67,7 @@ class TestReplace:
class TestReplaceFile:
def test_simple(self, tmpdir):
r = replace.Replace()
- with taddons.context() as tctx:
+ with taddons.context(r) as tctx:
tmpfile = tmpdir.join("replacement")
tmpfile.write("bar")
tctx.configure(
@@ -81,7 +81,7 @@ class TestReplaceFile:
def test_nonexistent(self, tmpdir):
r = replace.Replace()
- with taddons.context() as tctx:
+ with taddons.context(r) as tctx:
with pytest.raises(Exception, match="Invalid file path"):
tctx.configure(
r,