mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-26 10:16:27 +00:00
Fix location for contrib har_dump.py in its test (#4424)
To run the test, I had to copy `conftest.py` to examples. cp test/conftest.py examples pytest examples/contrib/test_har_dump.py This fixes the `fixture 'tdata' not found` error.
This commit is contained in:
parent
578514d4f2
commit
00f718e6c0
@ -21,7 +21,7 @@ class TestHARDump:
|
|||||||
|
|
||||||
def test_simple(self, tmpdir, tdata):
|
def test_simple(self, tmpdir, tdata):
|
||||||
with taddons.context() as tctx:
|
with taddons.context() as tctx:
|
||||||
a = tctx.script(tdata.path("../examples/complex/har_dump.py"))
|
a = tctx.script(tdata.path("../examples/contrib/har_dump.py"))
|
||||||
path = str(tmpdir.join("somefile"))
|
path = str(tmpdir.join("somefile"))
|
||||||
tctx.configure(a, hardump=path)
|
tctx.configure(a, hardump=path)
|
||||||
tctx.invoke(a, "response", self.flow())
|
tctx.invoke(a, "response", self.flow())
|
||||||
@ -32,7 +32,7 @@ class TestHARDump:
|
|||||||
|
|
||||||
def test_base64(self, tmpdir, tdata):
|
def test_base64(self, tmpdir, tdata):
|
||||||
with taddons.context() as tctx:
|
with taddons.context() as tctx:
|
||||||
a = tctx.script(tdata.path("../examples/complex/har_dump.py"))
|
a = tctx.script(tdata.path("../examples/contrib/har_dump.py"))
|
||||||
path = str(tmpdir.join("somefile"))
|
path = str(tmpdir.join("somefile"))
|
||||||
tctx.configure(a, hardump=path)
|
tctx.configure(a, hardump=path)
|
||||||
|
|
||||||
@ -46,7 +46,7 @@ class TestHARDump:
|
|||||||
|
|
||||||
def test_format_cookies(self, tdata):
|
def test_format_cookies(self, tdata):
|
||||||
with taddons.context() as tctx:
|
with taddons.context() as tctx:
|
||||||
a = tctx.script(tdata.path("../examples/complex/har_dump.py"))
|
a = tctx.script(tdata.path("../examples/contrib/har_dump.py"))
|
||||||
|
|
||||||
CA = cookies.CookieAttrs
|
CA = cookies.CookieAttrs
|
||||||
|
|
||||||
@ -65,7 +65,7 @@ class TestHARDump:
|
|||||||
|
|
||||||
def test_binary(self, tmpdir, tdata):
|
def test_binary(self, tmpdir, tdata):
|
||||||
with taddons.context() as tctx:
|
with taddons.context() as tctx:
|
||||||
a = tctx.script(tdata.path("../examples/complex/har_dump.py"))
|
a = tctx.script(tdata.path("../examples/contrib/har_dump.py"))
|
||||||
path = str(tmpdir.join("somefile"))
|
path = str(tmpdir.join("somefile"))
|
||||||
tctx.configure(a, hardump=path)
|
tctx.configure(a, hardump=path)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user