MCPcopy Index your code
hub / github.com/plotly/dash / test_invalid_pathname_prefix

Function test_invalid_pathname_prefix

tests/unit/test_configs.py:55–75  ·  view source on GitHub ↗
(empty_environ)

Source from the content-addressed store, hash-verified

53
54
55def test_invalid_pathname_prefix(empty_environ):
56 with pytest.raises(_exc.InvalidConfig, match="url_base_pathname"):
57 _, _, _ = pathname_configs("/my-path", "/another-path")
58
59 with pytest.raises(_exc.InvalidConfig) as excinfo:
60 _, _, _ = pathname_configs(
61 url_base_pathname="/invalid", routes_pathname_prefix="/invalid"
62 )
63 assert str(excinfo.value).split(".")[0].endswith("`routes_pathname_prefix`")
64
65 with pytest.raises(_exc.InvalidConfig) as excinfo:
66 _, _, _ = pathname_configs(
67 url_base_pathname="/my-path", requests_pathname_prefix="/another-path"
68 )
69 assert str(excinfo.value).split(".")[0].endswith("`requests_pathname_prefix`")
70
71 with pytest.raises(_exc.InvalidConfig, match="start with `/`"):
72 _, _, _ = pathname_configs("my-path")
73
74 with pytest.raises(_exc.InvalidConfig, match="end with `/`"):
75 _, _, _ = pathname_configs("/my-path")
76
77
78def test_pathname_prefix_from_environ_app_name(empty_environ):

Callers

nothing calls this directly

Calls 1

pathname_configsFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…