aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@corte.si>2017-12-17 13:09:19 +1300
committerGitHub <noreply@github.com>2017-12-17 13:09:19 +1300
commit45c613f970e23ce47fff175b5fc08f54ac9e9418 (patch)
tree6ce3575e396b5d917d839435339e9bbc9f07fe91 /test
parent1f6656ccb1e75822a84a8802b9bcbeb43709ba04 (diff)
parenta289db8d75dfc1afa5c45fbb419fdf113191ec2b (diff)
downloadmitmproxy-45c613f970e23ce47fff175b5fc08f54ac9e9418.tar.gz
mitmproxy-45c613f970e23ce47fff175b5fc08f54ac9e9418.tar.bz2
mitmproxy-45c613f970e23ce47fff175b5fc08f54ac9e9418.zip
Merge pull request #2687 from cortesi/minor1
commands: minor refactoring and command renaming
Diffstat (limited to 'test')
-rw-r--r--test/mitmproxy/test_command.py19
1 files changed, 9 insertions, 10 deletions
diff --git a/test/mitmproxy/test_command.py b/test/mitmproxy/test_command.py
index 47680c99..50ad3d55 100644
--- a/test/mitmproxy/test_command.py
+++ b/test/mitmproxy/test_command.py
@@ -151,19 +151,18 @@ def test_simple():
def test_typename():
- assert command.typename(str, True) == "str"
- assert command.typename(typing.Sequence[flow.Flow], True) == "[flow]"
- assert command.typename(typing.Sequence[flow.Flow], False) == "[flow]"
+ assert command.typename(str) == "str"
+ assert command.typename(typing.Sequence[flow.Flow]) == "[flow]"
- assert command.typename(command.Cuts, True) == "[cuts]"
- assert command.typename(typing.Sequence[command.Cut], False) == "[cut]"
+ assert command.typename(command.Cuts) == "[cuts]"
+ assert command.typename(typing.Sequence[command.Cut]) == "[cut]"
- assert command.typename(flow.Flow, False) == "flow"
- assert command.typename(typing.Sequence[str], False) == "[str]"
+ assert command.typename(flow.Flow) == "flow"
+ assert command.typename(typing.Sequence[str]) == "[str]"
- assert command.typename(command.Choice("foo"), False) == "choice"
- assert command.typename(command.Path, False) == "path"
- assert command.typename(command.Cmd, False) == "cmd"
+ assert command.typename(command.Choice("foo")) == "choice"
+ assert command.typename(command.Path) == "path"
+ assert command.typename(command.Cmd) == "cmd"
class DummyConsole: