MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_chunked

Method test_chunked

Lib/test/test_urllib2_localnet.py:527–539  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

525
526
527 def test_chunked(self):
528 expected_response = b"hello world"
529 chunked_start = (
530 b'a\r\n'
531 b'hello worl\r\n'
532 b'1\r\n'
533 b'd\r\n'
534 b'0\r\n'
535 )
536 response = [(200, [("Transfer-Encoding", "chunked")], chunked_start)]
537 handler = self.start_server(response)
538 data = self.urlopen("http://localhost:%s/" % handler.port)
539 self.assertEqual(data, expected_response)
540
541
542 def test_404(self):

Callers

nothing calls this directly

Calls 3

start_serverMethod · 0.95
urlopenMethod · 0.95
assertEqualMethod · 0.45

Tested by

no test coverage detected