diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2014-03-02 16:54:21 +1300 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2014-03-02 16:54:21 +1300 |
commit | 1acaf1c880ba7054e4eb1cc1ed4ea5d0cf852e61 (patch) | |
tree | ebd1108b62c9a52078051a77371d51a2859661b0 /test/test_odict.py | |
parent | e381c0366863ae412547e16d67860137a6b89a32 (diff) | |
download | mitmproxy-1acaf1c880ba7054e4eb1cc1ed4ea5d0cf852e61.tar.gz mitmproxy-1acaf1c880ba7054e4eb1cc1ed4ea5d0cf852e61.tar.bz2 mitmproxy-1acaf1c880ba7054e4eb1cc1ed4ea5d0cf852e61.zip |
Re-add state operations to ODict.
Diffstat (limited to 'test/test_odict.py')
-rw-r--r-- | test/test_odict.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/test_odict.py b/test/test_odict.py index cdbb4f39..794956be 100644 --- a/test/test_odict.py +++ b/test/test_odict.py @@ -24,6 +24,15 @@ class TestODict: for i in expected: assert out.find(i) >= 0 + def test_getset_state(self): + self.od.add("foo", 1) + self.od.add("foo", 2) + self.od.add("bar", 3) + state = self.od._get_state() + nd = odict.ODict._from_state(state) + assert nd == self.od + nd._load_state(state) + def test_dictToHeader2(self): self.od["one"] = ["uno"] expected1 = "one: uno\r\n" |