Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fixed #21099 - Skip DistinctOnTests unless backend can_distinct_on_field... #1622

Merged
merged 1 commit into from

3 participants

@manfre
Collaborator

...s

@akaariai
Collaborator

Looks good, will commit tomorrow (unless someone beats me to it).

@claudep claudep merged commit e4c6fca into django:master
@manfre manfre deleted the manfre:ticket-21099 branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 2 deletions.
  1. +1 −2  tests/distinct_on_fields/tests.py
View
3  tests/distinct_on_fields/tests.py
@@ -6,6 +6,7 @@
from .models import Tag, Celebrity, Fan, Staff, StaffTag
+@skipUnlessDBFeature('can_distinct_on_fields')
class DistinctOnTests(TestCase):
def setUp(self):
t1 = Tag.objects.create(name='t1')
@@ -29,7 +30,6 @@ def setUp(self):
self.fan2 = Fan.objects.create(fan_of=celeb1)
self.fan3 = Fan.objects.create(fan_of=celeb2)
- @skipUnlessDBFeature('can_distinct_on_fields')
def test_basic_distinct_on(self):
"""QuerySet.distinct('field', ...) works"""
# (qset, expected) tuples
@@ -101,7 +101,6 @@ def test_basic_distinct_on(self):
c2 = c1.distinct('pk')
self.assertNotIn('OUTER JOIN', str(c2.query))
- @skipUnlessDBFeature('can_distinct_on_fields')
def test_distinct_not_implemented_checks(self):
# distinct + annotate not allowed
with self.assertRaises(NotImplementedError):
Something went wrong with that request. Please try again.