mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-27 02:24:18 +00:00
Fix unit tests broken during previous commit.
This commit is contained in:
parent
c6150cc198
commit
35a914a549
@ -138,12 +138,12 @@ class udummy_cert(libpry.AutoTree):
|
|||||||
d = self.tmpdir()
|
d = self.tmpdir()
|
||||||
cacert = os.path.join(d, "foo/cert.cnf")
|
cacert = os.path.join(d, "foo/cert.cnf")
|
||||||
assert utils.dummy_ca(cacert)
|
assert utils.dummy_ca(cacert)
|
||||||
assert utils.dummy_cert(
|
p = utils.dummy_cert(
|
||||||
os.path.join(d, "foo"),
|
os.path.join(d, "foo"),
|
||||||
cacert,
|
cacert,
|
||||||
"foo.com"
|
"foo.com"
|
||||||
)
|
)
|
||||||
assert os.path.exists(os.path.join(d, "foo", "foo.com.pem"))
|
assert os.path.exists(p)
|
||||||
# Short-circuit
|
# Short-circuit
|
||||||
assert utils.dummy_cert(
|
assert utils.dummy_cert(
|
||||||
os.path.join(d, "foo"),
|
os.path.join(d, "foo"),
|
||||||
@ -153,12 +153,12 @@ class udummy_cert(libpry.AutoTree):
|
|||||||
|
|
||||||
def test_no_ca(self):
|
def test_no_ca(self):
|
||||||
d = self.tmpdir()
|
d = self.tmpdir()
|
||||||
assert utils.dummy_cert(
|
p = utils.dummy_cert(
|
||||||
d,
|
d,
|
||||||
None,
|
None,
|
||||||
"foo.com"
|
"foo.com"
|
||||||
)
|
)
|
||||||
assert os.path.exists(os.path.join(d, "foo.com.pem"))
|
assert os.path.exists(p)
|
||||||
|
|
||||||
|
|
||||||
class uLRUCache(libpry.AutoTree):
|
class uLRUCache(libpry.AutoTree):
|
||||||
|
Loading…
Reference in New Issue
Block a user