mirror of https://github.com/django/django.git
Refs #33646 -- Moved tests of QuerySet async interface into async tests.
This commit is contained in:
parent
3dc9f3ac69
commit
e580b891cb
|
@ -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)
|
Loading…
Reference in New Issue