MCPcopy
hub / github.com/tortoise/tortoise-orm / db_tsvector

Function db_tsvector

tests/contrib/postgres/conftest.py:64–79  ·  view source on GitHub ↗

Fixture for TestTSVectorField. Uses models defined in tests.contrib.postgres.models_tsvector module. Equivalent to: test.IsolatedTestCase with tortoise_test_modules

()

Source from the content-addressed store, hash-verified

62
63@pytest_asyncio.fixture(scope="function")
64async def db_tsvector():
65 """
66 Fixture for TestTSVectorField.
67
68 Uses models defined in tests.contrib.postgres.models_tsvector module.
69 Equivalent to: test.IsolatedTestCase with tortoise_test_modules
70 """
71 skip_if_not_postgres()
72 db_url = os.getenv("TORTOISE_TEST_DB", "sqlite://:memory:")
73 async with tortoise_test_context(
74 modules=["tests.contrib.postgres.models_tsvector"],
75 db_url=db_url,
76 app_label="models",
77 connection_label="models",
78 ) as ctx:
79 yield ctx
80
81
82@pytest_asyncio.fixture(scope="function")

Callers

nothing calls this directly

Calls 2

tortoise_test_contextFunction · 0.90
skip_if_not_postgresFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…