Coverage for tests/test_tutorial/test_fastapi/test_app_testing/test_tutorial001_tests004.py: 100%

10 statements  

« prev     ^ index     » next       coverage.py v7.6.1, created at 2024-09-09 00:02 +0000

1import importlib 1fabcde

2 

3import pytest 1fabcde

4 

5from docs_src.tutorial.fastapi.app_testing.tutorial001 import main as app_mod 1fabcde

6from docs_src.tutorial.fastapi.app_testing.tutorial001 import test_main_004 as test_mod 1fabcde

7 

8 

9@pytest.fixture(name="prepare", autouse=True) 1fabcde

10def prepare_fixture(clear_sqlmodel): 1abcde

11 # Trigger side effects of registering table models in SQLModel 

12 # This has to be called after clear_sqlmodel 

13 importlib.reload(app_mod) 1fabcde

14 importlib.reload(test_mod) 1fabcde

15 

16 

17def test_tutorial(): 1fabcde

18 test_mod.test_create_hero() 1ghijkl