コード例 #1
0
 def test_post(self):
     flow = tflow.tflow(req=req_post())
     result = """curl -X POST 'http://address:22/path' --data-binary 'content'"""
     assert export.curl_command(flow) == result
コード例 #2
0
 def test_patch(self):
     flow = tflow.tflow(req=req_patch())
     result = """curl -H 'header:qvalue' -H 'content-length:7' -X PATCH 'http://address:22/path?query=param' --data-binary 'content'"""
     assert export.curl_command(flow) == result
コード例 #3
0
 def test_patch(self):
     flow = tflow.tflow(req=req_patch())
     result = """curl -H 'header:qvalue' -H 'content-length:7' -X PATCH 'http://address:22/path?query=param' --data-binary 'content'"""
     assert export.curl_command(flow) == result
コード例 #4
0
 def test_get(self):
     flow = tflow.tflow(req=req_get())
     result = """curl -H 'header:qvalue' -H 'content-length:7' 'http://address:22/path?a=foo&a=bar&b=baz'"""
     assert export.curl_command(flow) == result
コード例 #5
0
 def test_post(self):
     flow = tflow.tflow(req=req_post())
     result = """curl -X POST 'http://address:22/path' --data-binary 'content'"""
     assert export.curl_command(flow) == result
コード例 #6
0
 def test_get(self):
     flow = tflow.tflow(req=req_get())
     result = """curl -H 'header:qvalue' -H 'content-length:7' 'http://address:22/path?a=foo&a=bar&b=baz'"""
     assert export.curl_command(flow) == result
コード例 #7
0
ファイル: test_export.py プロジェクト: zengchunyun/mitmproxy
 def test_patch(self, patch_request):
     result = """curl -H 'header:qvalue' -H 'content-length:7' -X PATCH 'http://address:22/path?query=param' --data-binary 'content'"""
     assert export.curl_command(patch_request) == result
コード例 #8
0
ファイル: test_export.py プロジェクト: zengchunyun/mitmproxy
 def test_post(self, post_request):
     result = "curl -X POST 'http://address:22/path' --data-binary '{}'".format(
         str(bytes(range(256)))[2:-1])
     assert export.curl_command(post_request) == result
コード例 #9
0
ファイル: test_export.py プロジェクト: zengchunyun/mitmproxy
 def test_get(self, get_request):
     result = """curl -H 'header:qvalue' -H 'content-length:7' 'http://address:22/path?a=foo&a=bar&b=baz'"""
     assert export.curl_command(get_request) == result