MCPcopy
hub / github.com/benoitc/gunicorn / test_response_attributes

Method test_response_attributes

tests/workers/test_ggevent.py:189–196  ·  view source on GitHub ↗

Test GeventResponse stores status, headers, and sent.

(self)

Source from the content-addressed store, hash-verified

187 """Test GeventResponse helper class."""
188
189 def test_response_attributes(self):
190 """Test GeventResponse stores status, headers, and sent."""
191 from gunicorn.workers.ggevent import GeventResponse
192
193 resp = GeventResponse('200 OK', {'Content-Type': 'text/html'}, 1024)
194 assert resp.status == '200 OK'
195 assert resp.headers == {'Content-Type': 'text/html'}
196 assert resp.sent == 1024
197
198
199class TestTimeoutContext:

Callers

nothing calls this directly

Calls 1

GeventResponseClass · 0.90

Tested by

no test coverage detected