Fix error when serializing reverted SSL flows.
This commit is contained in:
parent
4acc9aca27
commit
aa708a2d28
|
@ -538,7 +538,7 @@ class Response(HTTPMsg):
|
||||||
self.headers = ODictCaseless._from_state(state["headers"])
|
self.headers = ODictCaseless._from_state(state["headers"])
|
||||||
self.content = state["content"]
|
self.content = state["content"]
|
||||||
self.timestamp = state["timestamp"]
|
self.timestamp = state["timestamp"]
|
||||||
self.cert = state["cert"]
|
self.cert = certutils.SSLCert.from_pem(state["cert"]) if state["cert"] else None
|
||||||
|
|
||||||
def _get_state(self):
|
def _get_state(self):
|
||||||
return dict(
|
return dict(
|
||||||
|
|
|
@ -192,6 +192,13 @@ class TestFlow:
|
||||||
f.revert()
|
f.revert()
|
||||||
assert f.request.content == "foo"
|
assert f.request.content == "foo"
|
||||||
|
|
||||||
|
def test_backup_idempotence(self):
|
||||||
|
f = tutils.tflow_full()
|
||||||
|
f.backup()
|
||||||
|
f.revert()
|
||||||
|
f.backup()
|
||||||
|
f.revert()
|
||||||
|
|
||||||
def test_getset_state(self):
|
def test_getset_state(self):
|
||||||
f = tutils.tflow()
|
f = tutils.tflow()
|
||||||
f.response = tutils.tresp(f.request)
|
f.response = tutils.tresp(f.request)
|
||||||
|
|
Loading…
Reference in New Issue