Removed hardcoded paths to SpatialRefSys models in tests.

This commit is contained in:
Tim Graham 2020-09-14 01:58:05 -04:00 committed by GitHub
parent a7a4ff1026
commit 71ae1ab012
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 23 deletions

View file

@ -52,21 +52,6 @@ spatialite = _default_db == 'spatialite'
# MySQL spatial indices can't handle NULL geometries.
gisfield_may_be_null = not mysql
if oracle and 'gis' in settings.DATABASES[DEFAULT_DB_ALIAS]['ENGINE']:
from django.contrib.gis.db.backends.oracle.models import (
OracleSpatialRefSys as SpatialRefSys,
)
elif postgis:
from django.contrib.gis.db.backends.postgis.models import (
PostGISSpatialRefSys as SpatialRefSys,
)
elif spatialite:
from django.contrib.gis.db.backends.spatialite.models import (
SpatialiteSpatialRefSys as SpatialRefSys,
)
else:
SpatialRefSys = None
class FuncTestMixin:
"""Assert that Func expressions aren't mutated during their as_sql()."""