MCPcopy Index your code
hub / github.com/python/cpython / testBytesData

Method testBytesData

Lib/test/test_wsgiref.py:756–770  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

754 )
755
756 def testBytesData(self):
757 def app(e, s):
758 s("200 OK", [
759 ("Content-Type", "text/plain; charset=utf-8"),
760 ])
761 return [b"data"]
762
763 h = TestHandler()
764 h.run(app)
765 self.assertEqual(b"Status: 200 OK\r\n"
766 b"Content-Type: text/plain; charset=utf-8\r\n"
767 b"Content-Length: 4\r\n"
768 b"\r\n"
769 b"data",
770 h.stdout.getvalue())
771
772 def testCloseOnError(self):
773 side_effects = {'close_called': False}

Callers

nothing calls this directly

Calls 4

TestHandlerClass · 0.70
runMethod · 0.45
assertEqualMethod · 0.45
getvalueMethod · 0.45

Tested by

no test coverage detected