Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_parser_request_3(self):
p = httptools.HttpRequestParser(None)
with self.assertRaises(httptools.HttpParserInvalidURLError):
p.feed_data(b'POST HTTP/1.2')
def test_parser_url_9(self):
with self.assertRaisesRegex(httptools.HttpParserInvalidURLError,
r'a\\x00aa'):
self.parse(b'dsf://a\x00aa')