MCPcopy
hub / github.com/pallets/werkzeug / test_access_route

Function test_access_route

tests/test_wrappers.py:112–121  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

110
111
112def test_access_route():
113 req = wrappers.Request.from_values(
114 headers={"X-Forwarded-For": "192.168.1.2, 192.168.1.1"},
115 environ_base={"REMOTE_ADDR": "192.168.1.3"},
116 )
117 assert req.access_route == ["192.168.1.2", "192.168.1.1"]
118 assert req.remote_addr == "192.168.1.3"
119
120 req = wrappers.Request.from_values(environ_base={"REMOTE_ADDR": "192.168.1.3"})
121 assert list(req.access_route) == ["192.168.1.3"]
122
123
124def test_url_request_descriptors():

Callers

nothing calls this directly

Calls 2

from_valuesMethod · 0.80
listFunction · 0.50

Tested by

no test coverage detected