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

Function test_environ_defaults

tests/test_routing.py:252–260  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

250
251
252def test_environ_defaults():
253 environ = create_environ("/foo")
254 assert environ["PATH_INFO"] == "/foo"
255 m = r.Map([r.Rule("/foo", endpoint="foo"), r.Rule("/bar", endpoint="bar")])
256 a = m.bind_to_environ(environ)
257 assert a.match("/foo") == ("foo", {})
258 assert a.match() == ("foo", {})
259 assert a.match("/bar") == ("bar", {})
260 pytest.raises(NotFound, a.match, "/bars")
261
262
263def test_environ_nonascii_pathinfo():

Callers

nothing calls this directly

Calls 3

bind_to_environMethod · 0.95
create_environFunction · 0.90
matchMethod · 0.45

Tested by

no test coverage detected