Python 3.6
http-parser 0.8.3
fromhttp_parser.httpimportHttpStream, HTTP_REQUESTfromioimportBytesIOstream=HttpStream(BytesIO(b"GET /admin HTTP/1.1\r\n\r\n"), kind=HTTP_REQUEST)
This will raise AssertError
assertstream.method() =="GET"# DELETEassertstream.url() =="/admin"
This is correct
assertstream.url() =="/admin"assertstream.method() =="GET"
Python 3.6
http-parser 0.8.3
This will raise AssertError
This is correct