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
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
def test_get(self): flow = tutils.tflow(req=req_get()) result = dedent(""" GET /path?a=foo&a=bar&b=baz 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
def test_post(self): flow = tutils.tflow(req=req_post) result = dedent(""" POST /path HTTP/1.1\r content-type: application/json\r host: address:22\r \r {"name": "example", "email": "*****@*****.**"} """).strip() assert flow_export.raw_request(flow) == result
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
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