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-09-22 00:03 +0000
« prev ^ index » next coverage.py v7.6.1, created at 2025-09-22 00:03 +0000
1import importlib 1abcdef
3import pytest 1abcdef
4from fastapi.exceptions import FastAPIError 1abcdef
6from ...utils import needs_py310 1abcdef
9@pytest.mark.parametrize( 1abcdef
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: 1abcdef
17 with pytest.raises(FastAPIError): 1ghijkl
18 importlib.import_module(f"docs_src.response_model.{module_name}") 1ghijkl