Function
test_app_unimportable_other
(caplog: pytest.LogCaptureFixture)
Source from the content-addressed store, hash-verified
| 212 | |
| 213 | |
| 214 | def test_app_unimportable_other(caplog: pytest.LogCaptureFixture) -> None: |
| 215 | config = Config(app="tests.test_config:app") |
| 216 | with pytest.raises(SystemExit): |
| 217 | config.load() |
| 218 | error_messages = [ |
| 219 | record.message for record in caplog.records if record.name == "uvicorn.error" and record.levelname == "ERROR" |
| 220 | ] |
| 221 | assert ( |
| 222 | 'Error loading ASGI app. Attribute "app" not found in module "tests.test_config".' # noqa: E501 |
| 223 | == error_messages.pop(0) |
| 224 | ) |
| 225 | |
| 226 | |
| 227 | def test_app_factory(caplog: pytest.LogCaptureFixture) -> None: |
Callers
nothing calls this directly
Tested by
no test coverage detected