mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2025-05-24 23:39:11 +03:00
Add awaits into async resource class test
This commit is contained in:
parent
3ab2b1f573
commit
d23d506e1a
|
@ -401,10 +401,12 @@ class AsyncResourceTest(AsyncTestCase):
|
||||||
shutdown_counter = 0
|
shutdown_counter = 0
|
||||||
|
|
||||||
async def init(self):
|
async def init(self):
|
||||||
|
await asyncio.sleep(0.001)
|
||||||
self.__class__.init_counter += 1
|
self.__class__.init_counter += 1
|
||||||
return resource
|
return resource
|
||||||
|
|
||||||
async def shutdown(self, resource_):
|
async def shutdown(self, resource_):
|
||||||
|
await asyncio.sleep(0.001)
|
||||||
self.__class__.shutdown_counter += 1
|
self.__class__.shutdown_counter += 1
|
||||||
assert resource_ is resource
|
assert resource_ is resource
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user