Removed unneeded @no_oracle skips.

This commit is contained in:
Tim Graham 2020-09-07 15:28:32 -04:00 committed by Mariusz Felisiak
parent 7734337bcb
commit c3b1e41288
3 changed files with 1 additions and 27 deletions

View File

@ -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."

View File

@ -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')

View File

@ -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'