From 635f7a971d4bb815c8963ac52187b0c0f4f143d7 Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Wed, 26 Jan 2011 16:50:17 +1300 Subject: Add saving and loading of complete flows for later replay and analysis. --- test/test_console.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/test_console.py b/test/test_console.py index 399cc485..c5c856f8 100644 --- a/test/test_console.py +++ b/test/test_console.py @@ -57,7 +57,6 @@ class uState(libpry.AutoTree): resp = tresp(req) assert c.add_response(resp) assert len(c.flow_list) == 1 - assert f.waiting == False assert c.lookup(resp) newresp = tresp() @@ -183,6 +182,20 @@ class uState(libpry.AutoTree): c.clear() assert len(c.flow_list) == 0 + def test_dump_flows(self): + c = console.ConsoleState() + self._add_request(c) + self._add_response(c) + self._add_request(c) + self._add_response(c) + self._add_request(c) + self._add_response(c) + + dump = c.dump_flows() + c.clear() + c.load_flows(dump, console.ConsoleFlow) + assert isinstance(c.flow_list[0], console.ConsoleFlow) + class uFlow(libpry.AutoTree): def test_match(self): -- cgit v1.2.3