Ejemplo n.º 1
0
 def test_parse_windows(self):
     with tutils.chdir(tutils.test_data.dirname):
         assert script.parse_command(
             "mitmproxy/data\\addonscripts\\recorder.py"
         ) == ("mitmproxy/data\\addonscripts\\recorder.py", [])
         assert script.parse_command(
             "mitmproxy/data\\addonscripts\\recorder.py 'foo \\ bar'"
         ) == ("mitmproxy/data\\addonscripts\\recorder.py", ['foo \\ bar'])
Ejemplo n.º 2
0
 def test_parse_windows(self):
     with tutils.chdir(tutils.test_data.dirname):
         assert script.parse_command(
             "mitmproxy/data\\addonscripts\\recorder.py"
         ) == ("mitmproxy/data\\addonscripts\\recorder.py", [])
         assert script.parse_command(
             "mitmproxy/data\\addonscripts\\recorder.py 'foo \\ bar'"
         ) == ("mitmproxy/data\\addonscripts\\recorder.py", ['foo \\ bar'])
Ejemplo n.º 3
0
 def test_parse_args(self):
     with tutils.chdir(tutils.test_data.dirname):
         assert script.parse_command(
             "mitmproxy/data/addonscripts/recorder.py") == (
                 "mitmproxy/data/addonscripts/recorder.py", [])
         assert script.parse_command(
             "mitmproxy/data/addonscripts/recorder.py foo bar") == (
                 "mitmproxy/data/addonscripts/recorder.py", ["foo", "bar"])
         assert script.parse_command(
             "mitmproxy/data/addonscripts/recorder.py 'foo bar'") == (
                 "mitmproxy/data/addonscripts/recorder.py", ["foo bar"])
Ejemplo n.º 4
0
 def test_parse_args(self):
     with tutils.chdir(tutils.test_data.dirname):
         assert script.parse_command(
             "mitmproxy/data/addonscripts/recorder.py"
         ) == ("mitmproxy/data/addonscripts/recorder.py", [])
         assert script.parse_command(
             "mitmproxy/data/addonscripts/recorder.py foo bar"
         ) == ("mitmproxy/data/addonscripts/recorder.py", ["foo", "bar"])
         assert script.parse_command(
             "mitmproxy/data/addonscripts/recorder.py 'foo bar'"
         ) == ("mitmproxy/data/addonscripts/recorder.py", ["foo bar"])