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