From a0a65b2fd21d3f09997ff1701cb44e32d6eb0f59 Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Wed, 17 Sep 2014 15:33:50 -0400 Subject: [PATCH] [1.7.x] Skipped some broken tests on Oracle GIS; refs #23504. Backport of 7fce7f51ef from master --- django/contrib/gis/tests/geoapp/test_regress.py | 6 +++++- django/contrib/gis/tests/relatedapp/tests.py | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/django/contrib/gis/tests/geoapp/test_regress.py b/django/contrib/gis/tests/geoapp/test_regress.py index 5fd74ea9972..28f559ef440 100644 --- a/django/contrib/gis/tests/geoapp/test_regress.py +++ b/django/contrib/gis/tests/geoapp/test_regress.py @@ -7,7 +7,7 @@ from unittest import skipUnless from django.contrib.gis.geos import HAS_GEOS from django.contrib.gis.tests.utils import no_mysql, no_spatialite from django.contrib.gis.shortcuts import render_to_kmz -from django.contrib.gis.tests.utils import HAS_SPATIAL_DB +from django.contrib.gis.tests.utils import HAS_SPATIAL_DB, no_oracle from django.db.models import Count, Min from django.test import TestCase @@ -68,6 +68,10 @@ class GeoRegressionTests(TestCase): # .count() should not throw TypeError in __eq__ self.assertEqual(cities_within_state.count(), 1) + # 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 def test_defer_or_only_with_annotate(self): "Regression for #16409. Make sure defer() and only() work with annotate()" self.assertIsInstance(list(City.objects.annotate(Count('point')).defer('name')), list) diff --git a/django/contrib/gis/tests/relatedapp/tests.py b/django/contrib/gis/tests/relatedapp/tests.py index b478005c40c..67819117b6a 100644 --- a/django/contrib/gis/tests/relatedapp/tests.py +++ b/django/contrib/gis/tests/relatedapp/tests.py @@ -253,6 +253,10 @@ 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 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')