A fixture for a SQL key-value store client.
(
configuration: Configuration,
)
| 34 | |
| 35 | @pytest.fixture |
| 36 | async def kvs_client( |
| 37 | configuration: Configuration, |
| 38 | ) -> AsyncGenerator[SqlKeyValueStoreClient, None]: |
| 39 | """A fixture for a SQL key-value store client.""" |
| 40 | async with SqlStorageClient() as storage_client: |
| 41 | client = await storage_client.create_kvs_client( |
| 42 | name='test-kvs', |
| 43 | configuration=configuration, |
| 44 | ) |
| 45 | yield client |
| 46 | await client.drop() |
| 47 | |
| 48 | |
| 49 | # Helper function that allows you to use inspect with an asynchronous engine |
nothing calls this directly
no test coverage detected