Coverage for tests/test_tutorial/test_response_model/test_tutorial003_04.py: 100%
8 statements
« prev ^ index » next coverage.py v7.6.1, created at 2025-12-04 08:29 +0000
« prev ^ index » next coverage.py v7.6.1, created at 2025-12-04 08:29 +0000
1import importlib 1abcdefg
3import pytest 1abcdefg
4from fastapi.exceptions import FastAPIError 1abcdefg
6from ...utils import needs_py310 1abcdefg
9@pytest.mark.parametrize( 1abcdefg
10 "module_name",
11 [
12 "tutorial003_04",
13 pytest.param("tutorial003_04_py310", marks=needs_py310),
14 ],
15)
16def test_invalid_response_model(module_name: str) -> None: 1abcdefg
17 with pytest.raises(FastAPIError): 1hijklmn
18 importlib.import_module(f"docs_src.response_model.{module_name}") 1hijklmn