Fixture for TestEnumField and TestCustomFieldFilters. Uses models defined in tests.fields.subclass_models module. Equivalent to: test.IsolatedTestCase with tortoise_test_modules=["tests.fields.subclass_models"]
()
| 36 | |
| 37 | @pytest_asyncio.fixture(scope="function") |
| 38 | async def db_subclass_fields(): |
| 39 | """ |
| 40 | Fixture for TestEnumField and TestCustomFieldFilters. |
| 41 | |
| 42 | Uses models defined in tests.fields.subclass_models module. |
| 43 | Equivalent to: test.IsolatedTestCase with tortoise_test_modules=["tests.fields.subclass_models"] |
| 44 | """ |
| 45 | db_url = os.getenv("TORTOISE_TEST_DB", "sqlite://:memory:") |
| 46 | async with tortoise_test_context( |
| 47 | modules=["tests.fields.subclass_models"], |
| 48 | db_url=db_url, |
| 49 | app_label="models", |
| 50 | connection_label="models", |
| 51 | ) as ctx: |
| 52 | yield ctx |
nothing calls this directly
no test coverage detected
searching dependent graphs…