diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2014-09-17 11:35:14 +1200 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2014-09-17 11:41:42 +1200 |
commit | d998790c2f12594e6d0edc5a98e908677b60b31f (patch) | |
tree | 2c9de7840374297d466eabf7670e87ab943e059f /test/tutils.py | |
parent | b9531ac89ba70d8404444d4e2b86b94153a783c9 (diff) | |
download | mitmproxy-d998790c2f12594e6d0edc5a98e908677b60b31f.tar.gz mitmproxy-d998790c2f12594e6d0edc5a98e908677b60b31f.tar.bz2 mitmproxy-d998790c2f12594e6d0edc5a98e908677b60b31f.zip |
Clean up and clarify StateObject
- Flatten the class hierarchy
- get_state, load_state, from_state are public
- Simplify code
- Remove __eq__ and __neq__. This fundamentally changes the semantics of
inherited objects in a way that's not part of the core function of the
class
Diffstat (limited to 'test/tutils.py')
-rw-r--r-- | test/tutils.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/tutils.py b/test/tutils.py index 69f79a91..e7720d33 100644 --- a/test/tutils.py +++ b/test/tutils.py @@ -55,7 +55,7 @@ def tclient_conn(): """ @return: libmproxy.proxy.connection.ClientConnection """ - c = ClientConnection._from_state(dict( + c = ClientConnection.from_state(dict( address=dict(address=("address", 22), use_ipv6=True), clientcert=None )) @@ -67,7 +67,7 @@ def tserver_conn(): """ @return: libmproxy.proxy.connection.ServerConnection """ - c = ServerConnection._from_state(dict( + c = ServerConnection.from_state(dict( address=dict(address=("address", 22), use_ipv6=True), state=[], source_address=dict(address=("address", 22), use_ipv6=True), |