예제 #1
0
 def test_post(self):
     flow = tutils.tflow(req=req_post)
     result = dedent("""
         POST /path HTTP/1.1\r
         host: address:22\r
         \r
         content
     """).strip()
     assert flow_export.raw_request(flow) == result
예제 #2
0
 def test_get(self):
     flow = tutils.tflow(req=req_get)
     result = dedent("""
         GET /path HTTP/1.1\r
         header: qvalue\r
         content-length: 7\r
         host: address:22\r
         \r
     """).strip(" ").lstrip()
     assert flow_export.raw_request(flow) == result
예제 #3
0
 def test_patch(self):
     flow = tutils.tflow(req=req_patch)
     result = dedent("""
         PATCH /path?query=param HTTP/1.1\r
         header: qvalue\r
         content-length: 7\r
         host: address:22\r
         \r
         content
     """).strip()
     assert flow_export.raw_request(flow) == result