Fixed #26513 -- Added tests for <Backend>GeometryColumns.geom_col_name().
This commit is contained in:
parent
692870b611
commit
591e2270dc
|
@ -1,4 +1,4 @@
|
||||||
from unittest import skipIf
|
from unittest import skipIf, skipUnless
|
||||||
|
|
||||||
from django.contrib.gis.db.models import fields
|
from django.contrib.gis.db.models import fields
|
||||||
from django.contrib.gis.geos import MultiPolygon, Polygon
|
from django.contrib.gis.geos import MultiPolygon, Polygon
|
||||||
|
@ -10,7 +10,7 @@ from django.test import (
|
||||||
TransactionTestCase, skipIfDBFeature, skipUnlessDBFeature,
|
TransactionTestCase, skipIfDBFeature, skipUnlessDBFeature,
|
||||||
)
|
)
|
||||||
|
|
||||||
from ..utils import mysql, spatialite
|
from ..utils import mysql, oracle, spatialite
|
||||||
|
|
||||||
try:
|
try:
|
||||||
GeometryColumns = connection.ops.geometry_columns()
|
GeometryColumns = connection.ops.geometry_columns()
|
||||||
|
@ -116,6 +116,13 @@ class OperationTests(OperationTestCase):
|
||||||
if self.has_spatial_indexes:
|
if self.has_spatial_indexes:
|
||||||
self.assertSpatialIndexExists('gis_neighborhood', 'path')
|
self.assertSpatialIndexExists('gis_neighborhood', 'path')
|
||||||
|
|
||||||
|
@skipUnless(HAS_GEOMETRY_COLUMNS, "Backend doesn't support GeometryColumns.")
|
||||||
|
def test_geom_col_name(self):
|
||||||
|
self.assertEqual(
|
||||||
|
GeometryColumns.geom_col_name(),
|
||||||
|
'column_name' if oracle else 'f_geometry_column',
|
||||||
|
)
|
||||||
|
|
||||||
@skipUnlessDBFeature('supports_raster')
|
@skipUnlessDBFeature('supports_raster')
|
||||||
def test_add_raster_field(self):
|
def test_add_raster_field(self):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in New Issue