diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2012-02-25 12:19:54 +1300 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2012-02-25 12:19:54 +1300 |
commit | 986a41d1806eba2ad3d3746c9163cff9502b9482 (patch) | |
tree | a6d2fb25fb16876522c0275b90a8695039a0721d /test/test_flow.py | |
parent | bcda65e45371b15fc57783c3d579492626d1d8ed (diff) | |
download | mitmproxy-986a41d1806eba2ad3d3746c9163cff9502b9482.tar.gz mitmproxy-986a41d1806eba2ad3d3746c9163cff9502b9482.tar.bz2 mitmproxy-986a41d1806eba2ad3d3746c9163cff9502b9482.zip |
Unit test++.
Diffstat (limited to 'test/test_flow.py')
-rw-r--r-- | test/test_flow.py | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/test/test_flow.py b/test/test_flow.py index ffcb6e25..67dfe3c2 100644 --- a/test/test_flow.py +++ b/test/test_flow.py @@ -143,6 +143,17 @@ class uFlow(libpry.AutoTree): assert not f.request is f2.request assert f.request.headers == f2.request.headers assert not f.request.headers is f2.request.headers + assert f.response == f2.response + assert not f.response is f2.response + + f = tutils.tflow_err() + f2 = f.copy() + assert not f is f2 + assert not f.request is f2.request + assert f.request.headers == f2.request.headers + assert not f.request.headers is f2.request.headers + assert f.error == f2.error + assert not f.error is f2.error def test_match(self): f = tutils.tflow() @@ -301,7 +312,6 @@ class uState(libpry.AutoTree): assert c.add_response(resp) assert c.active_flow_count() == 0 - def test_err(self): c = flow.State() req = tutils.treq() @@ -322,7 +332,6 @@ class uState(libpry.AutoTree): assert c.add_error(e) assert c.view - def test_set_limit(self): c = flow.State() |