mirror of
https://github.com/django/django.git
synced 2025-01-03 06:55:47 +00:00
Refs #373 -- Used a feature flag to disable composite subquery test on MySQL.
This commit is contained in:
parent
8864125d1f
commit
03c0a3de72
@ -1,7 +1,6 @@
|
|||||||
import itertools
|
import itertools
|
||||||
import unittest
|
|
||||||
|
|
||||||
from django.db import NotSupportedError, connection
|
from django.db import NotSupportedError
|
||||||
from django.db.models import F
|
from django.db.models import F
|
||||||
from django.db.models.fields.tuple_lookups import (
|
from django.db.models.fields.tuple_lookups import (
|
||||||
TupleExact,
|
TupleExact,
|
||||||
@ -12,7 +11,7 @@ from django.db.models.fields.tuple_lookups import (
|
|||||||
TupleLessThan,
|
TupleLessThan,
|
||||||
TupleLessThanOrEqual,
|
TupleLessThanOrEqual,
|
||||||
)
|
)
|
||||||
from django.test import TestCase
|
from django.test import TestCase, skipUnlessDBFeature
|
||||||
|
|
||||||
from .models import Contact, Customer
|
from .models import Contact, Customer
|
||||||
|
|
||||||
@ -119,10 +118,7 @@ class TupleLookupsTests(TestCase):
|
|||||||
Contact.objects.filter(lookup).order_by("id"), contacts
|
Contact.objects.filter(lookup).order_by("id"), contacts
|
||||||
)
|
)
|
||||||
|
|
||||||
@unittest.skipIf(
|
@skipUnlessDBFeature("allow_sliced_subqueries_with_in")
|
||||||
connection.vendor == "mysql",
|
|
||||||
"MySQL doesn't support LIMIT & IN/ALL/ANY/SOME subquery",
|
|
||||||
)
|
|
||||||
def test_in_subquery(self):
|
def test_in_subquery(self):
|
||||||
subquery = Customer.objects.filter(id=self.customer_1.id)[:1]
|
subquery = Customer.objects.filter(id=self.customer_1.id)[:1]
|
||||||
self.assertSequenceEqual(
|
self.assertSequenceEqual(
|
||||||
|
Loading…
Reference in New Issue
Block a user