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

Method test_default_values

tests/test_uwsgi.py:180–191  ·  view source on GitHub ↗

Test default values when vars are missing.

(self)

Source from the content-addressed store, hash-verified

178 assert req.scheme == 'https'
179
180 def test_default_values(self):
181 """Test default values when vars are missing."""
182 packet = make_uwsgi_packet({})
183 unreader = IterUnreader([packet])
184 cfg = MockConfig()
185
186 req = UWSGIRequest(cfg, unreader, ('127.0.0.1', 12345))
187
188 assert req.method == 'GET'
189 assert req.path == '/'
190 assert req.query == ''
191 assert req.uri == '/'
192
193 def test_uwsgi_vars_preserved(self):
194 """Test that all vars are preserved in uwsgi_vars."""

Callers

nothing calls this directly

Calls 4

IterUnreaderClass · 0.90
UWSGIRequestClass · 0.90
make_uwsgi_packetFunction · 0.85
MockConfigClass · 0.70

Tested by

no test coverage detected