Changes between Version 2 and Version 3 of Ticket #35245, comment 4
- Timestamp:
- Feb 23, 2024, 2:36:50 AM (10 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #35245, comment 4
v2 v3 7 7 instance = await asyncio.gather(SimpleModel.objects.filter(field=4).afirst()) 8 8 self.assertIsNone(instance[0]) 9 async def test_afirst_gather_my_provider(self): 10 class MyProvider: 11 async def get(self) -> list[str]: 12 print("afirst inside gather") 13 res = await SimpleModel.objects.afirst() 14 print("afirst inside gather done") 15 return res 16 instance = await asyncio.gather(*[MyProvider().get()]) 17 self.assertEqual(instance[0], self.s1) 9 18 }}} 10 19 This UT works fine so I think the issue is not related to asyncio.gather and async ORM call.