Skip to content

Added support capture queries in async context

Choose a tag to compare

@Friskes Friskes released this 28 Feb 23:06
· 4 commits to main since this release
@pytest.mark.asyncio()
@pytest.mark.django_db(transaction=True)
async def test_1(self):
    async with CaptureQueries(number_runs=1, advanced_verb=True) as ctx:
        response = await self.client.get(url)

>>> Queries count: 10  |  Execution time: 0.04s  |  Vendor: sqlite