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
Post a Comment