From c3b1e41288bc99b6e2f188ccfdafb7016d14b783 Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Mon, 7 Sep 2020 15:28:32 -0400 Subject: [PATCH] Removed unneeded @no_oracle skips. --- tests/gis_tests/geoapp/tests.py | 6 +----- tests/gis_tests/relatedapp/tests.py | 5 ----- tests/gis_tests/utils.py | 17 ----------------- 3 files changed, 1 insertion(+), 27 deletions(-) diff --git a/tests/gis_tests/geoapp/tests.py b/tests/gis_tests/geoapp/tests.py index fb1df6a79f..98523c2add 100644 --- a/tests/gis_tests/geoapp/tests.py +++ b/tests/gis_tests/geoapp/tests.py @@ -14,8 +14,7 @@ from django.db.models import F, OuterRef, Subquery from django.test import TestCase, skipUnlessDBFeature from ..utils import ( - mariadb, mysql, no_oracle, oracle, postgis, skipUnlessGISLookup, - spatialite, + mariadb, mysql, oracle, postgis, skipUnlessGISLookup, spatialite, ) from .models import ( City, Country, Feature, MinusOneSRID, MultiFields, NonConcreteModel, @@ -157,9 +156,6 @@ class GeoModelTest(TestCase): self.assertIsInstance(f_4.geom, GeometryCollection) self.assertEqual(f_3.geom, f_4.geom[2]) - # TODO: fix on Oracle: ORA-22901: cannot compare nested table or VARRAY or - # LOB attributes of an object type. - @no_oracle @skipUnlessDBFeature("supports_transform") def test_inherited_geofields(self): "Database functions on inherited Geometry fields." diff --git a/tests/gis_tests/relatedapp/tests.py b/tests/gis_tests/relatedapp/tests.py index 2b4a0b0ed0..b834e13d48 100644 --- a/tests/gis_tests/relatedapp/tests.py +++ b/tests/gis_tests/relatedapp/tests.py @@ -5,7 +5,6 @@ from django.test import TestCase, skipUnlessDBFeature from django.test.utils import override_settings from django.utils import timezone -from ..utils import no_oracle from .models import ( Article, Author, Book, City, DirectoryEntry, Event, Location, Parcel, ) @@ -208,8 +207,6 @@ class RelatedGeoModelTest(TestCase): self.assertEqual(val_dict['id'], c_id) self.assertEqual(val_dict['location__id'], l_id) - # TODO: fix on Oracle -- qs2 returns an empty result for an unknown reason - @no_oracle def test10_combine(self): "Testing the combination of two QuerySets (#10807)." buf1 = City.objects.get(name='Aurora').location.point.buffer(0.1) @@ -252,8 +249,6 @@ class RelatedGeoModelTest(TestCase): self.assertEqual(2, qs[0]['num_cities']) self.assertIsInstance(qs[0]['point'], GEOSGeometry) - # TODO: The phantom model does appear on Oracle. - @no_oracle def test13_select_related_null_fk(self): "Testing `select_related` on a nullable ForeignKey." Book.objects.create(title='Without Author') diff --git a/tests/gis_tests/utils.py b/tests/gis_tests/utils.py index 7eb61701f8..d2089e87a3 100644 --- a/tests/gis_tests/utils.py +++ b/tests/gis_tests/utils.py @@ -24,23 +24,6 @@ def skipUnlessGISLookup(*gis_lookups): return decorator -def no_backend(test_func, backend): - "Use this decorator to disable test on specified backend." - if settings.DATABASES[DEFAULT_DB_ALIAS]['ENGINE'].rsplit('.')[-1] == backend: - @unittest.skip("This test is skipped on '%s' backend" % backend) - def inner(): - pass - return inner - else: - return test_func - - -# Decorators to disable entire test functions for specific -# spatial backends. -def no_oracle(func): - return no_backend(func, 'oracle') - - # Shortcut booleans to omit only portions of tests. _default_db = settings.DATABASES[DEFAULT_DB_ALIAS]['ENGINE'].rsplit('.')[-1] oracle = _default_db == 'oracle'