Opened 11 years ago

Closed 11 years ago

#22793 closed Bug (fixed)

GIS migrations tests attempt to import GeometryColumns from non-existing location

Reported by: Aymeric Augustin Owned by: nobody
Component: GIS Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

In django/contrib/gis/tests/gis_migrations/test_operations.py:

    try:
        from django.contrib.gis.models import GeometryColumns
        HAS_GEOMETRY_COLUMNS = True
    except ImportError:
        HAS_GEOMETRY_COLUMNS = False

But GeometryColumns isn't imported in django.contrib.gis.models any more since [cebd8753]. This results in tests being silently skipped.

The API to obtain the SpatialRefSys and GeometryColumns models for a given database connection is:

connection.ops.spatial_ref_sys()
connection.ops.geometry_columns()

This bug doesn't affect the 1.7 branch.

Change History (1)

comment:1 by Claude Paroz <claude@…>, 11 years ago

Resolution: fixed
Status: newclosed

In bc19ff6479261d80f3b1751700b7b9d4d7428211:

Fixed #22793 -- Updated import location for GeometryColumns in tests

The old location was removed in cebd8753c6.
Thanks Aymeric Augustin for the report.

Note: See TracTickets for help on using tickets.
Back to Top