diff options
author | Michael Manfre <mmanfre@gmail.com> | 2013-09-12 14:32:23 -0400 |
---|---|---|
committer | Michael Manfre <mmanfre@gmail.com> | 2013-09-12 14:32:23 -0400 |
commit | 018037736fe575307f5331ebb4b126a0c886ecef (patch) | |
tree | f926fd7700f06c9ad1c11398559b5ac3e5b1bf29 /tests/distinct_on_fields | |
parent | 4c5641dd92e5cfa0223f417f30d109ff998b8041 (diff) | |
download | django-018037736fe575307f5331ebb4b126a0c886ecef.tar.gz |
Fixed #21099 - Skip DistinctOnTests unless backend can_distinct_on_fields
Diffstat (limited to 'tests/distinct_on_fields')
-rw-r--r-- | tests/distinct_on_fields/tests.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/distinct_on_fields/tests.py b/tests/distinct_on_fields/tests.py index e9f08df84e..ec6c2d0463 100644 --- a/tests/distinct_on_fields/tests.py +++ b/tests/distinct_on_fields/tests.py @@ -6,6 +6,7 @@ from django.test.utils import str_prefix 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 @@ class DistinctOnTests(TestCase): 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 @@ class DistinctOnTests(TestCase): 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): |