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

Method test_wsgi_input

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

Source from the content-addressed store, hash-verified

180 self.assertEqual(err.splitlines()[-2], exc_message)
181
182 def test_wsgi_input(self):
183 def bad_app(e,s):
184 e["wsgi.input"].read()
185 s("200 OK", [("Content-Type", "text/plain; charset=utf-8")])
186 return [b"data"]
187 out, err = run_amock(validator(bad_app))
188 self.assertEndsWith(out,
189 b"A server error occurred. Please contact the administrator."
190 )
191 self.assertEqual(
192 err.splitlines()[-2], "AssertionError"
193 )
194
195 def test_bytes_validation(self):
196 def app(e, s):

Callers

nothing calls this directly

Calls 5

validatorFunction · 0.90
run_amockFunction · 0.85
assertEndsWithMethod · 0.80
assertEqualMethod · 0.45
splitlinesMethod · 0.45

Tested by

no test coverage detected