python - How to test aiohttp and peewee-async? -


i wanna run 2 asynchronous tests database class aiohttp , peewee-async.

@unittest_run_loop async def test_create_instance(self):     instance = await self.model.create_instance({})     self.asserttrue(isinstance(instance, dict))     self.asserttrue(instance not none)  @unittest_run_loop async def test_retrieve_instance(self):     instance = await self.model.create_instance({})     retrieved = await self.model.retrieve_instance(int(instance['id']))     self.asserttrue(instance == retrieved) 

but give just

peewee.programmingerror: close cannot used while asynchronous query underway 

thanks attention!


Comments

Popular posts from this blog

neo4j - finding mutual friends in a cypher statement starting with three or more persons -

php - How to remove letter in front of the word laravel -

minify - Minimizing css files -