aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_console.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_console.py')
-rw-r--r--test/test_console.py23
1 files changed, 12 insertions, 11 deletions
diff --git a/test/test_console.py b/test/test_console.py
index a935c146..3de9cca4 100644
--- a/test/test_console.py
+++ b/test/test_console.py
@@ -1,4 +1,5 @@
from libmproxy import console, filt, flow
+from libmproxy.console import common
import tutils
import libpry
@@ -78,7 +79,7 @@ class uState(libpry.AutoTree):
class uformat_keyvals(libpry.AutoTree):
def test_simple(self):
- assert console.format_keyvals(
+ assert common.format_keyvals(
[
("aa", "bb"),
None,
@@ -93,11 +94,11 @@ class uformat_flow(libpry.AutoTree):
def test_simple(self):
f = tutils.tflow()
foc = ('focus', '>>')
- assert foc not in console.format_flow(f, False)
- assert foc in console.format_flow(f, True)
+ assert foc not in common.format_flow(f, False)
+ assert foc in common.format_flow(f, True)
- assert foc not in console.format_flow(f, False, True)
- assert foc in console.format_flow(f, True, True)
+ assert foc not in common.format_flow(f, False, True)
+ assert foc in common.format_flow(f, True, True)
f.response = tutils.tresp()
f.request = f.response.request
@@ -105,17 +106,17 @@ class uformat_flow(libpry.AutoTree):
f.request._set_replay()
f.response._set_replay()
- assert ('method', '[replay]') in console.format_flow(f, True)
- assert ('method', '[replay]') in console.format_flow(f, True, True)
+ assert ('method', '[replay]') in common.format_flow(f, True)
+ assert ('method', '[replay]') in common.format_flow(f, True, True)
f.response.code = 404
- assert ('error', '404') in console.format_flow(f, True, True)
+ assert ('error', '404') in common.format_flow(f, True, True)
f.response.headers["content-type"] = ["text/html"]
- assert ('text', ' text/html') in console.format_flow(f, True, True)
+ assert ('text', ' text/html') in common.format_flow(f, True, True)
f.response =None
f.error = flow.Error(f.request, "error")
- assert ('error', 'error') in console.format_flow(f, True, True)
+ assert ('error', 'error') in common.format_flow(f, True, True)
@@ -169,7 +170,7 @@ class uOptions(libpry.AutoTree):
tests = [
uformat_keyvals(),
uformat_flow(),
- uState(),
+ uState(),
uPathCompleter(),
uOptions()
]