test_settings_validation_error() — fastapi Function Reference
Architecture documentation for the test_settings_validation_error() function in test_app01.py from the fastapi codebase.
Entity Profile
Dependency Diagram
graph TD c4175aaa_9c90_982c_fc5b_8b402bf5e276["test_settings_validation_error()"] b6d4ce17_3c8b_e696_67b2_a4ae4858a6c9["test_app01.py"] c4175aaa_9c90_982c_fc5b_8b402bf5e276 -->|defined in| b6d4ce17_3c8b_e696_67b2_a4ae4858a6c9 style c4175aaa_9c90_982c_fc5b_8b402bf5e276 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
tests/test_tutorial/test_settings/test_app01.py lines 31–46
def test_settings_validation_error(mod_name: str, monkeypatch: MonkeyPatch):
monkeypatch.delenv("ADMIN_EMAIL", raising=False)
if mod_name in sys.modules:
del sys.modules[mod_name] # pragma: no cover
with pytest.raises(ValidationError) as exc_info:
importlib.import_module(mod_name)
assert exc_info.value.errors() == [
{
"loc": ("admin_email",),
"msg": "Field required",
"type": "missing",
"input": {},
"url": IsAnyStr,
}
]
Domain
Subdomains
Source
Frequently Asked Questions
What does test_settings_validation_error() do?
test_settings_validation_error() is a function in the fastapi codebase, defined in tests/test_tutorial/test_settings/test_app01.py.
Where is test_settings_validation_error() defined?
test_settings_validation_error() is defined in tests/test_tutorial/test_settings/test_app01.py at line 31.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free