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

Method check_hello

Lib/test/test_wsgiref.py:107–118  ·  view source on GitHub ↗
(self, out, has_length=True)

Source from the content-addressed store, hash-verified

105class IntegrationTests(TestCase):
106
107 def check_hello(self, out, has_length=True):
108 pyver = (python_implementation() + "/" +
109 sys.version.split()[0])
110 self.assertEqual(out,
111 ("HTTP/1.0 200 OK\r\n"
112 "Server: WSGIServer " + pyver + "\r\n"
113 "Content-Type: text/plain\r\n"
114 "Date: Mon, 05 Jun 2006 18:49:54 GMT\r\n" +
115 (has_length and "Content-Length: 13\r\n" or "") +
116 "\r\n"
117 "Hello, world!").encode("iso-8859-1")
118 )
119
120 def test_plain_hello(self):
121 out, err = run_amock()

Callers 2

test_plain_helloMethod · 0.95
test_validated_helloMethod · 0.95

Calls 4

python_implementationFunction · 0.90
splitMethod · 0.45
assertEqualMethod · 0.45
encodeMethod · 0.45

Tested by

no test coverage detected