1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Replaced @no_oracle skips with DatabaseFeatures.allows_group_by_lob.

This commit is contained in:
Tim Graham
2020-09-07 15:45:56 -04:00
committed by Mariusz Felisiak
parent ad11f5b8c9
commit 755dbf39fc
6 changed files with 22 additions and 23 deletions

View File

@@ -222,10 +222,7 @@ class RelatedGeoModelTest(TestCase):
self.assertIn('Aurora', names)
self.assertIn('Kecksburg', names)
# TODO: fix on Oracle -- get the following error because the SQL is ordered
# by a geometry object, which Oracle apparently doesn't like:
# ORA-22901: cannot compare nested table or VARRAY or LOB attributes of an object type
@no_oracle
@skipUnlessDBFeature('allows_group_by_lob')
def test12a_count(self):
"Testing `Count` aggregate on geo-fields."
# The City, 'Fort Worth' uses the same location as Dallas.
@@ -247,10 +244,7 @@ class RelatedGeoModelTest(TestCase):
self.assertEqual(1, len(vqs))
self.assertEqual(3, vqs[0]['num_books'])
# TODO: fix on Oracle -- get the following error because the SQL is ordered
# by a geometry object, which Oracle apparently doesn't like:
# ORA-22901: cannot compare nested table or VARRAY or LOB attributes of an object type
@no_oracle
@skipUnlessDBFeature('allows_group_by_lob')
def test13c_count(self):
"Testing `Count` aggregate with `.values()`. See #15305."
qs = Location.objects.filter(id=5).annotate(num_cities=Count('city')).values('id', 'point', 'num_cities')