(empty_environ)
| 53 | |
| 54 | |
| 55 | def 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 | |
| 78 | def test_pathname_prefix_from_environ_app_name(empty_environ): |
nothing calls this directly
no test coverage detected
searching dependent graphs…