mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-22 15:37:45 +00:00
Added coverage for the changes made
This commit is contained in:
parent
39a6d4860c
commit
8b52ea248e
@ -367,6 +367,8 @@ def test_simple():
|
||||
c.add("one.two", a.cmd1)
|
||||
assert(c.commands["one.two"].help == "cmd1 help")
|
||||
assert(c.execute("one.two foo") == "ret foo")
|
||||
assert(c.execute("one.two \"foo\"") == "ret foo")
|
||||
assert(c.execute("one.two \"foo bar\"") == "ret \"foo bar\"")
|
||||
assert(c.call("one.two", "foo") == "ret foo")
|
||||
with pytest.raises(exceptions.CommandError, match="Unknown"):
|
||||
c.execute("nonexistent")
|
||||
@ -382,6 +384,8 @@ def test_simple():
|
||||
c.execute(r"\'")
|
||||
with pytest.raises(exceptions.CommandError, match="Unknown"):
|
||||
c.execute(r"\"")
|
||||
with pytest.raises(exceptions.CommandError, match="Unknown"):
|
||||
c.execute(r"\"")
|
||||
|
||||
c.add("empty", a.empty)
|
||||
c.execute("empty")
|
||||
|
Loading…
Reference in New Issue
Block a user