mirror of
				https://github.com/django/django.git
				synced 2025-10-28 08:06:09 +00:00 
			
		
		
		
	Refs #33646 -- Moved tests of QuerySet async interface into async tests.
This commit is contained in:
		| @@ -1,5 +1,11 @@ | ||||
| from django.db import models | ||||
| from django.utils import timezone | ||||
|  | ||||
|  | ||||
| class RelatedModel(models.Model): | ||||
|     simple = models.ForeignKey("SimpleModel", models.CASCADE, null=True) | ||||
|  | ||||
|  | ||||
| class SimpleModel(models.Model): | ||||
|     field = models.IntegerField() | ||||
|     created = models.DateTimeField(default=timezone.now) | ||||
|   | ||||
| @@ -243,6 +243,6 @@ class AsyncQuerySetTest(TestCase): | ||||
|                         self.fail(f"QuerySet.aexplain() result is not valid JSON: {e}") | ||||
| 
 | ||||
|     async def test_raw(self): | ||||
|         sql = "SELECT id, field FROM async_queryset_simplemodel WHERE created=%s" | ||||
|         sql = "SELECT id, field FROM async_simplemodel WHERE created=%s" | ||||
|         qs = SimpleModel.objects.raw(sql, [self.s1.created]) | ||||
|         self.assertEqual([o async for o in qs], [self.s1]) | ||||
| @@ -1,11 +0,0 @@ | ||||
| from django.db import models | ||||
| from django.utils import timezone | ||||
|  | ||||
|  | ||||
| class RelatedModel(models.Model): | ||||
|     simple = models.ForeignKey("SimpleModel", models.CASCADE, null=True) | ||||
|  | ||||
|  | ||||
| class SimpleModel(models.Model): | ||||
|     field = models.IntegerField() | ||||
|     created = models.DateTimeField(default=timezone.now) | ||||
		Reference in New Issue
	
	Block a user