summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2015-02-10 10:07:44 -0500
committerTim Graham <timograham@gmail.com>2015-02-11 10:29:54 -0500
commitad0be620aece4dde2f94383426c284f4afef9fbc (patch)
treea3539cd1368e540f2022d3f6d351473addce9ffe
parent5ab327a3894c26f57baabe14084bcce2a71b8af8 (diff)
downloaddjango-ad0be620aece4dde2f94383426c284f4afef9fbc.tar.gz
Moved contrib.gis tests out of contrib.
-rw-r--r--MANIFEST.in6
-rw-r--r--tests/gis_tests/__init__.py (renamed from django/contrib/gis/gdal/tests/__init__.py)0
-rw-r--r--tests/gis_tests/data/ch-city/ch-city.dbf (renamed from django/contrib/gis/tests/data/ch-city/ch-city.dbf)bin285 -> 285 bytes
-rw-r--r--tests/gis_tests/data/ch-city/ch-city.prj (renamed from django/contrib/gis/tests/data/ch-city/ch-city.prj)0
-rw-r--r--tests/gis_tests/data/ch-city/ch-city.shp (renamed from django/contrib/gis/tests/data/ch-city/ch-city.shp)bin128 -> 128 bytes
-rw-r--r--tests/gis_tests/data/ch-city/ch-city.shx (renamed from django/contrib/gis/tests/data/ch-city/ch-city.shx)bin108 -> 108 bytes
-rw-r--r--tests/gis_tests/data/cities/cities.dbf (renamed from django/contrib/gis/tests/data/cities/cities.dbf)bin533 -> 533 bytes
-rw-r--r--tests/gis_tests/data/cities/cities.prj (renamed from django/contrib/gis/tests/data/cities/cities.prj)0
-rw-r--r--tests/gis_tests/data/cities/cities.shp (renamed from django/contrib/gis/tests/data/cities/cities.shp)bin184 -> 184 bytes
-rw-r--r--tests/gis_tests/data/cities/cities.shx (renamed from django/contrib/gis/tests/data/cities/cities.shx)bin124 -> 124 bytes
-rw-r--r--tests/gis_tests/data/counties/counties.dbf (renamed from django/contrib/gis/tests/data/counties/counties.dbf)bin3961 -> 3961 bytes
-rw-r--r--tests/gis_tests/data/counties/counties.shp (renamed from django/contrib/gis/tests/data/counties/counties.shp)bin37364 -> 37364 bytes
-rw-r--r--tests/gis_tests/data/counties/counties.shx (renamed from django/contrib/gis/tests/data/counties/counties.shx)bin292 -> 292 bytes
-rw-r--r--tests/gis_tests/data/geometries.json (renamed from django/contrib/gis/tests/data/geometries.json)0
-rw-r--r--tests/gis_tests/data/interstates/interstates.dbf (renamed from django/contrib/gis/tests/data/interstates/interstates.dbf)bin412 -> 412 bytes
-rw-r--r--tests/gis_tests/data/interstates/interstates.prj (renamed from django/contrib/gis/tests/data/interstates/interstates.prj)0
-rw-r--r--tests/gis_tests/data/interstates/interstates.shp (renamed from django/contrib/gis/tests/data/interstates/interstates.shp)bin892 -> 892 bytes
-rw-r--r--tests/gis_tests/data/interstates/interstates.shx (renamed from django/contrib/gis/tests/data/interstates/interstates.shx)bin124 -> 124 bytes
-rw-r--r--tests/gis_tests/data/invalid/emptypoints.dbf (renamed from django/contrib/gis/tests/data/invalid/emptypoints.dbf)bin77 -> 77 bytes
-rw-r--r--tests/gis_tests/data/invalid/emptypoints.shp (renamed from django/contrib/gis/tests/data/invalid/emptypoints.shp)bin112 -> 112 bytes
-rw-r--r--tests/gis_tests/data/invalid/emptypoints.shx (renamed from django/contrib/gis/tests/data/invalid/emptypoints.shx)bin108 -> 108 bytes
-rw-r--r--tests/gis_tests/data/test_point/test_point.dbf (renamed from django/contrib/gis/tests/data/test_point/test_point.dbf)bin749 -> 749 bytes
-rw-r--r--tests/gis_tests/data/test_point/test_point.prj (renamed from django/contrib/gis/tests/data/test_point/test_point.prj)0
-rw-r--r--tests/gis_tests/data/test_point/test_point.shp (renamed from django/contrib/gis/tests/data/test_point/test_point.shp)bin240 -> 240 bytes
-rw-r--r--tests/gis_tests/data/test_point/test_point.shx (renamed from django/contrib/gis/tests/data/test_point/test_point.shx)bin140 -> 140 bytes
-rw-r--r--tests/gis_tests/data/test_poly/test_poly.dbf (renamed from django/contrib/gis/tests/data/test_poly/test_poly.dbf)bin501 -> 501 bytes
-rw-r--r--tests/gis_tests/data/test_poly/test_poly.prj (renamed from django/contrib/gis/tests/data/test_poly/test_poly.prj)0
-rw-r--r--tests/gis_tests/data/test_poly/test_poly.shp (renamed from django/contrib/gis/tests/data/test_poly/test_poly.shp)bin620 -> 620 bytes
-rw-r--r--tests/gis_tests/data/test_poly/test_poly.shx (renamed from django/contrib/gis/tests/data/test_poly/test_poly.shx)bin124 -> 124 bytes
-rw-r--r--tests/gis_tests/data/test_vrt/test_vrt.csv (renamed from django/contrib/gis/tests/data/test_vrt/test_vrt.csv)0
-rw-r--r--tests/gis_tests/data/test_vrt/test_vrt.vrt (renamed from django/contrib/gis/tests/data/test_vrt/test_vrt.vrt)0
-rw-r--r--tests/gis_tests/data/texas.dbf (renamed from django/contrib/gis/tests/data/texas.dbf)bin660 -> 660 bytes
-rw-r--r--tests/gis_tests/distapp/__init__.py (renamed from django/contrib/gis/geos/tests/__init__.py)0
-rw-r--r--tests/gis_tests/distapp/fixtures/initial.json (renamed from django/contrib/gis/tests/distapp/fixtures/initial.json)0
-rw-r--r--tests/gis_tests/distapp/models.py (renamed from django/contrib/gis/tests/distapp/models.py)4
-rw-r--r--tests/gis_tests/distapp/tests.py (renamed from django/contrib/gis/tests/distapp/tests.py)5
-rw-r--r--tests/gis_tests/gdal_tests/__init__.py (renamed from django/contrib/gis/tests/__init__.py)0
-rw-r--r--tests/gis_tests/gdal_tests/data/raster.tif (renamed from django/contrib/gis/gdal/tests/data/raster.tif)bin29158 -> 29158 bytes
-rw-r--r--tests/gis_tests/gdal_tests/test_driver.py (renamed from django/contrib/gis/gdal/tests/test_driver.py)0
-rw-r--r--tests/gis_tests/gdal_tests/test_ds.py (renamed from django/contrib/gis/gdal/tests/test_ds.py)5
-rw-r--r--tests/gis_tests/gdal_tests/test_envelope.py (renamed from django/contrib/gis/gdal/tests/test_envelope.py)0
-rw-r--r--tests/gis_tests/gdal_tests/test_geom.py (renamed from django/contrib/gis/gdal/tests/test_geom.py)3
-rw-r--r--tests/gis_tests/gdal_tests/test_raster.py (renamed from django/contrib/gis/gdal/tests/test_raster.py)0
-rw-r--r--tests/gis_tests/gdal_tests/test_srs.py (renamed from django/contrib/gis/gdal/tests/test_srs.py)0
-rw-r--r--tests/gis_tests/geo3d/__init__.py (renamed from django/contrib/gis/tests/distapp/__init__.py)0
-rw-r--r--tests/gis_tests/geo3d/models.py (renamed from django/contrib/gis/tests/geo3d/models.py)2
-rw-r--r--tests/gis_tests/geo3d/tests.py (renamed from django/contrib/gis/tests/geo3d/tests.py)0
-rw-r--r--tests/gis_tests/geo3d/views.py (renamed from django/contrib/gis/tests/geo3d/views.py)0
-rw-r--r--tests/gis_tests/geoadmin/__init__.py (renamed from django/contrib/gis/tests/geo3d/__init__.py)0
-rw-r--r--tests/gis_tests/geoadmin/admin.py (renamed from django/contrib/gis/tests/geoadmin/admin.py)0
-rw-r--r--tests/gis_tests/geoadmin/models.py (renamed from django/contrib/gis/tests/geoadmin/models.py)0
-rw-r--r--tests/gis_tests/geoadmin/tests.py (renamed from django/contrib/gis/tests/geoadmin/tests.py)0
-rw-r--r--tests/gis_tests/geoadmin/urls.py (renamed from django/contrib/gis/tests/geoadmin/urls.py)0
-rw-r--r--tests/gis_tests/geoapp/__init__.py (renamed from django/contrib/gis/tests/geoadmin/__init__.py)0
-rw-r--r--tests/gis_tests/geoapp/feeds.py (renamed from django/contrib/gis/tests/geoapp/feeds.py)0
-rw-r--r--tests/gis_tests/geoapp/fixtures/initial.json.gz (renamed from django/contrib/gis/tests/geoapp/fixtures/initial.json.gz)bin131247 -> 131247 bytes
-rw-r--r--tests/gis_tests/geoapp/models.py (renamed from django/contrib/gis/tests/geoapp/models.py)16
-rw-r--r--tests/gis_tests/geoapp/sitemaps.py (renamed from django/contrib/gis/tests/geoapp/sitemaps.py)0
-rw-r--r--tests/gis_tests/geoapp/test_feeds.py (renamed from django/contrib/gis/tests/geoapp/test_feeds.py)2
-rw-r--r--tests/gis_tests/geoapp/test_regress.py (renamed from django/contrib/gis/tests/geoapp/test_regress.py)3
-rw-r--r--tests/gis_tests/geoapp/test_serializers.py (renamed from django/contrib/gis/tests/geoapp/test_serializers.py)0
-rw-r--r--tests/gis_tests/geoapp/test_sitemaps.py (renamed from django/contrib/gis/tests/geoapp/test_sitemaps.py)2
-rw-r--r--tests/gis_tests/geoapp/tests.py (renamed from django/contrib/gis/tests/geoapp/tests.py)5
-rw-r--r--tests/gis_tests/geoapp/urls.py (renamed from django/contrib/gis/tests/geoapp/urls.py)0
-rw-r--r--tests/gis_tests/geogapp/__init__.py (renamed from django/contrib/gis/tests/geoapp/__init__.py)0
-rw-r--r--tests/gis_tests/geogapp/fixtures/initial.json (renamed from django/contrib/gis/tests/geogapp/fixtures/initial.json)0
-rw-r--r--tests/gis_tests/geogapp/models.py (renamed from django/contrib/gis/tests/geogapp/models.py)7
-rw-r--r--tests/gis_tests/geogapp/tests.py (renamed from django/contrib/gis/tests/geogapp/tests.py)3
-rw-r--r--tests/gis_tests/geos_tests/__init__.py (renamed from django/contrib/gis/tests/geogapp/__init__.py)0
-rw-r--r--tests/gis_tests/geos_tests/test_geos.py (renamed from django/contrib/gis/geos/tests/test_geos.py)14
-rw-r--r--tests/gis_tests/geos_tests/test_geos_mutation.py (renamed from django/contrib/gis/geos/tests/test_geos_mutation.py)8
-rw-r--r--tests/gis_tests/geos_tests/test_io.py (renamed from django/contrib/gis/geos/tests/test_io.py)7
-rw-r--r--tests/gis_tests/geos_tests/test_mutable_list.py (renamed from django/contrib/gis/geos/tests/test_mutable_list.py)0
-rw-r--r--tests/gis_tests/gis_migrations/__init__.py (renamed from django/contrib/gis/tests/gis_migrations/__init__.py)0
-rw-r--r--tests/gis_tests/gis_migrations/migrations/0001_initial.py (renamed from django/contrib/gis/tests/gis_migrations/migrations/0001_initial.py)0
-rw-r--r--tests/gis_tests/gis_migrations/migrations/__init__.py (renamed from django/contrib/gis/tests/gis_migrations/migrations/__init__.py)0
-rw-r--r--tests/gis_tests/gis_migrations/test_commands.py (renamed from django/contrib/gis/tests/gis_migrations/test_commands.py)2
-rw-r--r--tests/gis_tests/gis_migrations/test_operations.py (renamed from django/contrib/gis/tests/gis_migrations/test_operations.py)5
-rw-r--r--tests/gis_tests/inspectapp/__init__.py (renamed from django/contrib/gis/tests/inspectapp/__init__.py)0
-rw-r--r--tests/gis_tests/inspectapp/models.py (renamed from django/contrib/gis/tests/inspectapp/models.py)3
-rw-r--r--tests/gis_tests/inspectapp/tests.py (renamed from django/contrib/gis/tests/inspectapp/tests.py)3
-rw-r--r--tests/gis_tests/layermap/__init__.py (renamed from django/contrib/gis/tests/layermap/__init__.py)0
-rw-r--r--tests/gis_tests/layermap/models.py (renamed from django/contrib/gis/tests/layermap/models.py)10
-rw-r--r--tests/gis_tests/layermap/tests.py (renamed from django/contrib/gis/tests/layermap/tests.py)0
-rw-r--r--tests/gis_tests/maps/__init__.py (renamed from django/contrib/gis/tests/maps/__init__.py)0
-rw-r--r--tests/gis_tests/maps/tests.py (renamed from django/contrib/gis/tests/maps/tests.py)5
-rw-r--r--tests/gis_tests/relatedapp/__init__.py (renamed from django/contrib/gis/tests/relatedapp/__init__.py)0
-rw-r--r--tests/gis_tests/relatedapp/fixtures/initial.json (renamed from django/contrib/gis/tests/relatedapp/fixtures/initial.json)0
-rw-r--r--tests/gis_tests/relatedapp/models.py (renamed from django/contrib/gis/tests/relatedapp/models.py)4
-rw-r--r--tests/gis_tests/relatedapp/tests.py (renamed from django/contrib/gis/tests/relatedapp/tests.py)3
-rw-r--r--tests/gis_tests/test_data.py (renamed from django/contrib/gis/geometry/test_data.py)3
-rw-r--r--tests/gis_tests/test_geoforms.py (renamed from django/contrib/gis/tests/test_geoforms.py)0
-rw-r--r--tests/gis_tests/test_geoip.py (renamed from django/contrib/gis/geoip/tests.py)4
-rw-r--r--tests/gis_tests/test_measure.py (renamed from django/contrib/gis/tests/test_measure.py)0
-rw-r--r--tests/gis_tests/test_spatialrefsys.py (renamed from django/contrib/gis/tests/test_spatialrefsys.py)5
-rw-r--r--tests/gis_tests/tests.py (renamed from django/contrib/gis/tests/tests.py)0
-rw-r--r--tests/gis_tests/utils.py (renamed from django/contrib/gis/tests/utils.py)0
-rwxr-xr-xtests/runtests.py11
-rw-r--r--tests/test_runner/test_discover_runner.py4
99 files changed, 82 insertions, 72 deletions
diff --git a/MANIFEST.in b/MANIFEST.in
index bf94bbd650..7a9616cb48 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -19,14 +19,8 @@ recursive-include django/contrib/admin/templates *
recursive-include django/contrib/admin/static *
recursive-include django/contrib/admindocs/templates *
recursive-include django/contrib/auth/templates *
-recursive-include django/contrib/gis/gdal/tests/data *
recursive-include django/contrib/gis/static *
recursive-include django/contrib/gis/templates *
-recursive-include django/contrib/gis/tests/data *
-recursive-include django/contrib/gis/tests/distapp/fixtures *
-recursive-include django/contrib/gis/tests/geoapp/fixtures *
-recursive-include django/contrib/gis/tests/geogapp/fixtures *
-recursive-include django/contrib/gis/tests/relatedapp/fixtures *
recursive-include django/contrib/sitemaps/templates *
recursive-exclude * __pycache__
recursive-exclude * *.py[co]
diff --git a/django/contrib/gis/gdal/tests/__init__.py b/tests/gis_tests/__init__.py
index e69de29bb2..e69de29bb2 100644
--- a/django/contrib/gis/gdal/tests/__init__.py
+++ b/tests/gis_tests/__init__.py
diff --git a/django/contrib/gis/tests/data/ch-city/ch-city.dbf b/tests/gis_tests/data/ch-city/ch-city.dbf
index 6ba9d698f7..6ba9d698f7 100644
--- a/django/contrib/gis/tests/data/ch-city/ch-city.dbf
+++ b/tests/gis_tests/data/ch-city/ch-city.dbf
Binary files differ
diff --git a/django/contrib/gis/tests/data/ch-city/ch-city.prj b/tests/gis_tests/data/ch-city/ch-city.prj
index a30c00a55d..a30c00a55d 100644
--- a/django/contrib/gis/tests/data/ch-city/ch-city.prj
+++ b/tests/gis_tests/data/ch-city/ch-city.prj
diff --git a/django/contrib/gis/tests/data/ch-city/ch-city.shp b/tests/gis_tests/data/ch-city/ch-city.shp
index e430020de0..e430020de0 100644
--- a/django/contrib/gis/tests/data/ch-city/ch-city.shp
+++ b/tests/gis_tests/data/ch-city/ch-city.shp
Binary files differ
diff --git a/django/contrib/gis/tests/data/ch-city/ch-city.shx b/tests/gis_tests/data/ch-city/ch-city.shx
index a1487ad829..a1487ad829 100644
--- a/django/contrib/gis/tests/data/ch-city/ch-city.shx
+++ b/tests/gis_tests/data/ch-city/ch-city.shx
Binary files differ
diff --git a/django/contrib/gis/tests/data/cities/cities.dbf b/tests/gis_tests/data/cities/cities.dbf
index 8b276331b9..8b276331b9 100644
--- a/django/contrib/gis/tests/data/cities/cities.dbf
+++ b/tests/gis_tests/data/cities/cities.dbf
Binary files differ
diff --git a/django/contrib/gis/tests/data/cities/cities.prj b/tests/gis_tests/data/cities/cities.prj
index a30c00a55d..a30c00a55d 100644
--- a/django/contrib/gis/tests/data/cities/cities.prj
+++ b/tests/gis_tests/data/cities/cities.prj
diff --git a/django/contrib/gis/tests/data/cities/cities.shp b/tests/gis_tests/data/cities/cities.shp
index 1c46ccc5fc..1c46ccc5fc 100644
--- a/django/contrib/gis/tests/data/cities/cities.shp
+++ b/tests/gis_tests/data/cities/cities.shp
Binary files differ
diff --git a/django/contrib/gis/tests/data/cities/cities.shx b/tests/gis_tests/data/cities/cities.shx
index 6be3fd68e9..6be3fd68e9 100644
--- a/django/contrib/gis/tests/data/cities/cities.shx
+++ b/tests/gis_tests/data/cities/cities.shx
Binary files differ
diff --git a/django/contrib/gis/tests/data/counties/counties.dbf b/tests/gis_tests/data/counties/counties.dbf
index ccdbb264b9..ccdbb264b9 100644
--- a/django/contrib/gis/tests/data/counties/counties.dbf
+++ b/tests/gis_tests/data/counties/counties.dbf
Binary files differ
diff --git a/django/contrib/gis/tests/data/counties/counties.shp b/tests/gis_tests/data/counties/counties.shp
index 2e7dca5e43..2e7dca5e43 100644
--- a/django/contrib/gis/tests/data/counties/counties.shp
+++ b/tests/gis_tests/data/counties/counties.shp
Binary files differ
diff --git a/django/contrib/gis/tests/data/counties/counties.shx b/tests/gis_tests/data/counties/counties.shx
index 46ed3bb203..46ed3bb203 100644
--- a/django/contrib/gis/tests/data/counties/counties.shx
+++ b/tests/gis_tests/data/counties/counties.shx
Binary files differ
diff --git a/django/contrib/gis/tests/data/geometries.json b/tests/gis_tests/data/geometries.json
index c2b9e4f27e..c2b9e4f27e 100644
--- a/django/contrib/gis/tests/data/geometries.json
+++ b/tests/gis_tests/data/geometries.json
diff --git a/django/contrib/gis/tests/data/interstates/interstates.dbf b/tests/gis_tests/data/interstates/interstates.dbf
index a88d171588..a88d171588 100644
--- a/django/contrib/gis/tests/data/interstates/interstates.dbf
+++ b/tests/gis_tests/data/interstates/interstates.dbf
Binary files differ
diff --git a/django/contrib/gis/tests/data/interstates/interstates.prj b/tests/gis_tests/data/interstates/interstates.prj
index a30c00a55d..a30c00a55d 100644
--- a/django/contrib/gis/tests/data/interstates/interstates.prj
+++ b/tests/gis_tests/data/interstates/interstates.prj
diff --git a/django/contrib/gis/tests/data/interstates/interstates.shp b/tests/gis_tests/data/interstates/interstates.shp
index 6d93de75ec..6d93de75ec 100644
--- a/django/contrib/gis/tests/data/interstates/interstates.shp
+++ b/tests/gis_tests/data/interstates/interstates.shp
Binary files differ
diff --git a/django/contrib/gis/tests/data/interstates/interstates.shx b/tests/gis_tests/data/interstates/interstates.shx
index 7b9088ac5b..7b9088ac5b 100644
--- a/django/contrib/gis/tests/data/interstates/interstates.shx
+++ b/tests/gis_tests/data/interstates/interstates.shx
Binary files differ
diff --git a/django/contrib/gis/tests/data/invalid/emptypoints.dbf b/tests/gis_tests/data/invalid/emptypoints.dbf
index aa2109047a..aa2109047a 100644
--- a/django/contrib/gis/tests/data/invalid/emptypoints.dbf
+++ b/tests/gis_tests/data/invalid/emptypoints.dbf
Binary files differ
diff --git a/django/contrib/gis/tests/data/invalid/emptypoints.shp b/tests/gis_tests/data/invalid/emptypoints.shp
index bdcfb83be4..bdcfb83be4 100644
--- a/django/contrib/gis/tests/data/invalid/emptypoints.shp
+++ b/tests/gis_tests/data/invalid/emptypoints.shp
Binary files differ
diff --git a/django/contrib/gis/tests/data/invalid/emptypoints.shx b/tests/gis_tests/data/invalid/emptypoints.shx
index dea663eb08..dea663eb08 100644
--- a/django/contrib/gis/tests/data/invalid/emptypoints.shx
+++ b/tests/gis_tests/data/invalid/emptypoints.shx
Binary files differ
diff --git a/django/contrib/gis/tests/data/test_point/test_point.dbf b/tests/gis_tests/data/test_point/test_point.dbf
index b2b4ecaea2..b2b4ecaea2 100644
--- a/django/contrib/gis/tests/data/test_point/test_point.dbf
+++ b/tests/gis_tests/data/test_point/test_point.dbf
Binary files differ
diff --git a/django/contrib/gis/tests/data/test_point/test_point.prj b/tests/gis_tests/data/test_point/test_point.prj
index a30c00a55d..a30c00a55d 100644
--- a/django/contrib/gis/tests/data/test_point/test_point.prj
+++ b/tests/gis_tests/data/test_point/test_point.prj
diff --git a/django/contrib/gis/tests/data/test_point/test_point.shp b/tests/gis_tests/data/test_point/test_point.shp
index 95e8b0ac9b..95e8b0ac9b 100644
--- a/django/contrib/gis/tests/data/test_point/test_point.shp
+++ b/tests/gis_tests/data/test_point/test_point.shp
Binary files differ
diff --git a/django/contrib/gis/tests/data/test_point/test_point.shx b/tests/gis_tests/data/test_point/test_point.shx
index 087f3da1f7..087f3da1f7 100644
--- a/django/contrib/gis/tests/data/test_point/test_point.shx
+++ b/tests/gis_tests/data/test_point/test_point.shx
Binary files differ
diff --git a/django/contrib/gis/tests/data/test_poly/test_poly.dbf b/tests/gis_tests/data/test_poly/test_poly.dbf
index 7965bd614d..7965bd614d 100644
--- a/django/contrib/gis/tests/data/test_poly/test_poly.dbf
+++ b/tests/gis_tests/data/test_poly/test_poly.dbf
Binary files differ
diff --git a/django/contrib/gis/tests/data/test_poly/test_poly.prj b/tests/gis_tests/data/test_poly/test_poly.prj
index a30c00a55d..a30c00a55d 100644
--- a/django/contrib/gis/tests/data/test_poly/test_poly.prj
+++ b/tests/gis_tests/data/test_poly/test_poly.prj
diff --git a/django/contrib/gis/tests/data/test_poly/test_poly.shp b/tests/gis_tests/data/test_poly/test_poly.shp
index b22930bd24..b22930bd24 100644
--- a/django/contrib/gis/tests/data/test_poly/test_poly.shp
+++ b/tests/gis_tests/data/test_poly/test_poly.shp
Binary files differ
diff --git a/django/contrib/gis/tests/data/test_poly/test_poly.shx b/tests/gis_tests/data/test_poly/test_poly.shx
index c92f78bd4c..c92f78bd4c 100644
--- a/django/contrib/gis/tests/data/test_poly/test_poly.shx
+++ b/tests/gis_tests/data/test_poly/test_poly.shx
Binary files differ
diff --git a/django/contrib/gis/tests/data/test_vrt/test_vrt.csv b/tests/gis_tests/data/test_vrt/test_vrt.csv
index dff648ffe0..dff648ffe0 100644
--- a/django/contrib/gis/tests/data/test_vrt/test_vrt.csv
+++ b/tests/gis_tests/data/test_vrt/test_vrt.csv
diff --git a/django/contrib/gis/tests/data/test_vrt/test_vrt.vrt b/tests/gis_tests/data/test_vrt/test_vrt.vrt
index 979c179bb0..979c179bb0 100644
--- a/django/contrib/gis/tests/data/test_vrt/test_vrt.vrt
+++ b/tests/gis_tests/data/test_vrt/test_vrt.vrt
diff --git a/django/contrib/gis/tests/data/texas.dbf b/tests/gis_tests/data/texas.dbf
index 827c065071..827c065071 100644
--- a/django/contrib/gis/tests/data/texas.dbf
+++ b/tests/gis_tests/data/texas.dbf
Binary files differ
diff --git a/django/contrib/gis/geos/tests/__init__.py b/tests/gis_tests/distapp/__init__.py
index e69de29bb2..e69de29bb2 100644
--- a/django/contrib/gis/geos/tests/__init__.py
+++ b/tests/gis_tests/distapp/__init__.py
diff --git a/django/contrib/gis/tests/distapp/fixtures/initial.json b/tests/gis_tests/distapp/fixtures/initial.json
index 6cd67c7fea..6cd67c7fea 100644
--- a/django/contrib/gis/tests/distapp/fixtures/initial.json
+++ b/tests/gis_tests/distapp/fixtures/initial.json
diff --git a/django/contrib/gis/tests/distapp/models.py b/tests/gis_tests/distapp/models.py
index 87694a424f..255bc08bb0 100644
--- a/django/contrib/gis/tests/distapp/models.py
+++ b/tests/gis_tests/distapp/models.py
@@ -1,7 +1,8 @@
from django.contrib.gis.db import models
-from django.contrib.gis.tests.utils import gisfield_may_be_null
from django.utils.encoding import python_2_unicode_compatible
+from ..utils import gisfield_may_be_null
+
@python_2_unicode_compatible
class NamedModel(models.Model):
@@ -11,7 +12,6 @@ class NamedModel(models.Model):
class Meta:
abstract = True
- app_label = 'distapp'
def __str__(self):
return self.name
diff --git a/django/contrib/gis/tests/distapp/tests.py b/tests/gis_tests/distapp/tests.py
index 4c2ea60950..b9ba7e4df8 100644
--- a/django/contrib/gis/tests/distapp/tests.py
+++ b/tests/gis_tests/distapp/tests.py
@@ -2,13 +2,12 @@ from __future__ import unicode_literals
from django.contrib.gis.geos import HAS_GEOS
from django.contrib.gis.measure import D # alias for Distance
-from django.contrib.gis.tests.utils import (
- no_oracle, oracle, postgis, spatialite,
-)
from django.db import connection
from django.db.models import Q
from django.test import TestCase, skipUnlessDBFeature
+from ..utils import no_oracle, oracle, postgis, spatialite
+
if HAS_GEOS:
from django.contrib.gis.geos import GEOSGeometry, LineString
diff --git a/django/contrib/gis/tests/__init__.py b/tests/gis_tests/gdal_tests/__init__.py
index e69de29bb2..e69de29bb2 100644
--- a/django/contrib/gis/tests/__init__.py
+++ b/tests/gis_tests/gdal_tests/__init__.py
diff --git a/django/contrib/gis/gdal/tests/data/raster.tif b/tests/gis_tests/gdal_tests/data/raster.tif
index 8a50ae24e6..8a50ae24e6 100644
--- a/django/contrib/gis/gdal/tests/data/raster.tif
+++ b/tests/gis_tests/gdal_tests/data/raster.tif
Binary files differ
diff --git a/django/contrib/gis/gdal/tests/test_driver.py b/tests/gis_tests/gdal_tests/test_driver.py
index 265bb7a32a..265bb7a32a 100644
--- a/django/contrib/gis/gdal/tests/test_driver.py
+++ b/tests/gis_tests/gdal_tests/test_driver.py
diff --git a/django/contrib/gis/gdal/tests/test_ds.py b/tests/gis_tests/gdal_tests/test_ds.py
index ef62c160cc..a0dcfb53e4 100644
--- a/django/contrib/gis/gdal/tests/test_ds.py
+++ b/tests/gis_tests/gdal_tests/test_ds.py
@@ -3,9 +3,8 @@ import unittest
from unittest import skipUnless
from django.contrib.gis.gdal import HAS_GDAL
-from django.contrib.gis.geometry.test_data import (
- TEST_DATA, TestDS, get_ds_file,
-)
+
+from ..test_data import TEST_DATA, TestDS, get_ds_file
if HAS_GDAL:
from django.contrib.gis.gdal import DataSource, Envelope, OGRGeometry, GDALException, OGRIndexError, GDAL_VERSION
diff --git a/django/contrib/gis/gdal/tests/test_envelope.py b/tests/gis_tests/gdal_tests/test_envelope.py
index cf0eea4b1a..cf0eea4b1a 100644
--- a/django/contrib/gis/gdal/tests/test_envelope.py
+++ b/tests/gis_tests/gdal_tests/test_envelope.py
diff --git a/django/contrib/gis/gdal/tests/test_geom.py b/tests/gis_tests/gdal_tests/test_geom.py
index 33b70b4df3..dd8047628d 100644
--- a/django/contrib/gis/gdal/tests/test_geom.py
+++ b/tests/gis_tests/gdal_tests/test_geom.py
@@ -4,9 +4,10 @@ from binascii import b2a_hex
from unittest import skipUnless
from django.contrib.gis.gdal import HAS_GDAL
-from django.contrib.gis.geometry.test_data import TestDataMixin
from django.utils.six.moves import range
+from ..test_data import TestDataMixin
+
try:
from django.utils.six.moves import cPickle as pickle
except ImportError:
diff --git a/django/contrib/gis/gdal/tests/test_raster.py b/tests/gis_tests/gdal_tests/test_raster.py
index 4dd6042ee5..4dd6042ee5 100644
--- a/django/contrib/gis/gdal/tests/test_raster.py
+++ b/tests/gis_tests/gdal_tests/test_raster.py
diff --git a/django/contrib/gis/gdal/tests/test_srs.py b/tests/gis_tests/gdal_tests/test_srs.py
index 1d011d88ab..1d011d88ab 100644
--- a/django/contrib/gis/gdal/tests/test_srs.py
+++ b/tests/gis_tests/gdal_tests/test_srs.py
diff --git a/django/contrib/gis/tests/distapp/__init__.py b/tests/gis_tests/geo3d/__init__.py
index e69de29bb2..e69de29bb2 100644
--- a/django/contrib/gis/tests/distapp/__init__.py
+++ b/tests/gis_tests/geo3d/__init__.py
diff --git a/django/contrib/gis/tests/geo3d/models.py b/tests/gis_tests/geo3d/models.py
index 2244ed8b15..9575966e75 100644
--- a/django/contrib/gis/tests/geo3d/models.py
+++ b/tests/gis_tests/geo3d/models.py
@@ -10,7 +10,6 @@ class NamedModel(models.Model):
class Meta:
abstract = True
- app_label = 'geo3d'
def __str__(self):
return self.name
@@ -50,7 +49,6 @@ class SimpleModel(models.Model):
class Meta:
abstract = True
- app_label = 'geo3d'
class Point2D(SimpleModel):
diff --git a/django/contrib/gis/tests/geo3d/tests.py b/tests/gis_tests/geo3d/tests.py
index 022a8063ab..022a8063ab 100644
--- a/django/contrib/gis/tests/geo3d/tests.py
+++ b/tests/gis_tests/geo3d/tests.py
diff --git a/django/contrib/gis/tests/geo3d/views.py b/tests/gis_tests/geo3d/views.py
index 60f00ef0ef..60f00ef0ef 100644
--- a/django/contrib/gis/tests/geo3d/views.py
+++ b/tests/gis_tests/geo3d/views.py
diff --git a/django/contrib/gis/tests/geo3d/__init__.py b/tests/gis_tests/geoadmin/__init__.py
index e69de29bb2..e69de29bb2 100644
--- a/django/contrib/gis/tests/geo3d/__init__.py
+++ b/tests/gis_tests/geoadmin/__init__.py
diff --git a/django/contrib/gis/tests/geoadmin/admin.py b/tests/gis_tests/geoadmin/admin.py
index ab39c28885..ab39c28885 100644
--- a/django/contrib/gis/tests/geoadmin/admin.py
+++ b/tests/gis_tests/geoadmin/admin.py
diff --git a/django/contrib/gis/tests/geoadmin/models.py b/tests/gis_tests/geoadmin/models.py
index cf8470e792..cf8470e792 100644
--- a/django/contrib/gis/tests/geoadmin/models.py
+++ b/tests/gis_tests/geoadmin/models.py
diff --git a/django/contrib/gis/tests/geoadmin/tests.py b/tests/gis_tests/geoadmin/tests.py
index 86c8ce9a1a..86c8ce9a1a 100644
--- a/django/contrib/gis/tests/geoadmin/tests.py
+++ b/tests/gis_tests/geoadmin/tests.py
diff --git a/django/contrib/gis/tests/geoadmin/urls.py b/tests/gis_tests/geoadmin/urls.py
index eb91d283d4..eb91d283d4 100644
--- a/django/contrib/gis/tests/geoadmin/urls.py
+++ b/tests/gis_tests/geoadmin/urls.py
diff --git a/django/contrib/gis/tests/geoadmin/__init__.py b/tests/gis_tests/geoapp/__init__.py
index e69de29bb2..e69de29bb2 100644
--- a/django/contrib/gis/tests/geoadmin/__init__.py
+++ b/tests/gis_tests/geoapp/__init__.py
diff --git a/django/contrib/gis/tests/geoapp/feeds.py b/tests/gis_tests/geoapp/feeds.py
index f2ebc46109..f2ebc46109 100644
--- a/django/contrib/gis/tests/geoapp/feeds.py
+++ b/tests/gis_tests/geoapp/feeds.py
diff --git a/django/contrib/gis/tests/geoapp/fixtures/initial.json.gz b/tests/gis_tests/geoapp/fixtures/initial.json.gz
index df9243a479..df9243a479 100644
--- a/django/contrib/gis/tests/geoapp/fixtures/initial.json.gz
+++ b/tests/gis_tests/geoapp/fixtures/initial.json.gz
Binary files differ
diff --git a/django/contrib/gis/tests/geoapp/models.py b/tests/gis_tests/geoapp/models.py
index 38e19cdea6..a0e910684d 100644
--- a/django/contrib/gis/tests/geoapp/models.py
+++ b/tests/gis_tests/geoapp/models.py
@@ -1,7 +1,8 @@
from django.contrib.gis.db import models
-from django.contrib.gis.tests.utils import gisfield_may_be_null
from django.utils.encoding import python_2_unicode_compatible
+from ..utils import gisfield_may_be_null
+
@python_2_unicode_compatible
class NamedModel(models.Model):
@@ -11,7 +12,6 @@ class NamedModel(models.Model):
class Meta:
abstract = True
- app_label = 'geoapp'
def __str__(self):
return self.name
@@ -24,6 +24,9 @@ class Country(NamedModel):
class City(NamedModel):
point = models.PointField()
+ class Meta:
+ app_label = 'geoapp'
+
# This is an inherited model from City
class PennsylvaniaCity(City):
@@ -41,6 +44,9 @@ class PennsylvaniaCity(City):
class State(NamedModel):
poly = models.PolygonField(null=gisfield_may_be_null) # Allowing NULL geometries here.
+ class Meta:
+ app_label = 'geoapp'
+
class Track(NamedModel):
line = models.LineStringField()
@@ -57,9 +63,6 @@ class Truth(models.Model):
objects = models.GeoManager()
- class Meta:
- app_label = 'geoapp'
-
class Feature(NamedModel):
geom = models.GeometryField()
@@ -70,9 +73,6 @@ class MinusOneSRID(models.Model):
objects = models.GeoManager()
- class Meta:
- app_label = 'geoapp'
-
class NonConcreteField(models.IntegerField):
diff --git a/django/contrib/gis/tests/geoapp/sitemaps.py b/tests/gis_tests/geoapp/sitemaps.py
index 1a3101290a..1a3101290a 100644
--- a/django/contrib/gis/tests/geoapp/sitemaps.py
+++ b/tests/gis_tests/geoapp/sitemaps.py
diff --git a/django/contrib/gis/tests/geoapp/test_feeds.py b/tests/gis_tests/geoapp/test_feeds.py
index 19a6f69b00..baf2051364 100644
--- a/django/contrib/gis/tests/geoapp/test_feeds.py
+++ b/tests/gis_tests/geoapp/test_feeds.py
@@ -14,7 +14,7 @@ if HAS_GEOS:
@modify_settings(INSTALLED_APPS={'append': 'django.contrib.sites'})
-@override_settings(ROOT_URLCONF='django.contrib.gis.tests.geoapp.urls')
+@override_settings(ROOT_URLCONF='gis_tests.geoapp.urls')
@skipUnlessDBFeature("gis_enabled")
class GeoFeedTest(TestCase):
fixtures = ['initial']
diff --git a/django/contrib/gis/tests/geoapp/test_regress.py b/tests/gis_tests/geoapp/test_regress.py
index 60dbe5e56d..e3f5437991 100644
--- a/django/contrib/gis/tests/geoapp/test_regress.py
+++ b/tests/gis_tests/geoapp/test_regress.py
@@ -5,10 +5,11 @@ from datetime import datetime
from django.contrib.gis.geos import HAS_GEOS
from django.contrib.gis.shortcuts import render_to_kmz
-from django.contrib.gis.tests.utils import no_oracle
from django.db.models import Count, Min
from django.test import TestCase, skipUnlessDBFeature
+from ..utils import no_oracle
+
if HAS_GEOS:
from django.contrib.gis.db.models import Extent
from .models import City, PennsylvaniaCity, State, Truth
diff --git a/django/contrib/gis/tests/geoapp/test_serializers.py b/tests/gis_tests/geoapp/test_serializers.py
index 5656ea6f4e..5656ea6f4e 100644
--- a/django/contrib/gis/tests/geoapp/test_serializers.py
+++ b/tests/gis_tests/geoapp/test_serializers.py
diff --git a/django/contrib/gis/tests/geoapp/test_sitemaps.py b/tests/gis_tests/geoapp/test_sitemaps.py
index 6a2d1f40b8..416166b198 100644
--- a/django/contrib/gis/tests/geoapp/test_sitemaps.py
+++ b/tests/gis_tests/geoapp/test_sitemaps.py
@@ -18,7 +18,7 @@ if HAS_GEOS:
@modify_settings(INSTALLED_APPS={'append': ['django.contrib.sites', 'django.contrib.sitemaps']})
-@override_settings(ROOT_URLCONF='django.contrib.gis.tests.geoapp.urls')
+@override_settings(ROOT_URLCONF='gis_tests.geoapp.urls')
@skipUnlessDBFeature("gis_enabled")
class GeoSitemapTest(TestCase):
diff --git a/django/contrib/gis/tests/geoapp/tests.py b/tests/gis_tests/geoapp/tests.py
index 23a7437231..e49dd5118c 100644
--- a/django/contrib/gis/tests/geoapp/tests.py
+++ b/tests/gis_tests/geoapp/tests.py
@@ -5,15 +5,14 @@ from tempfile import NamedTemporaryFile
from django.contrib.gis import gdal
from django.contrib.gis.geos import HAS_GEOS
-from django.contrib.gis.tests.utils import (
- no_oracle, oracle, postgis, spatialite,
-)
from django.core.management import call_command
from django.db import connection
from django.test import TestCase, ignore_warnings, skipUnlessDBFeature
from django.utils import six
from django.utils.deprecation import RemovedInDjango20Warning
+from ..utils import no_oracle, oracle, postgis, spatialite
+
if HAS_GEOS:
from django.contrib.gis.db.models import Extent, MakeLine, Union
from django.contrib.gis.geos import (fromstr, GEOSGeometry,
diff --git a/django/contrib/gis/tests/geoapp/urls.py b/tests/gis_tests/geoapp/urls.py
index 40a48053c7..40a48053c7 100644
--- a/django/contrib/gis/tests/geoapp/urls.py
+++ b/tests/gis_tests/geoapp/urls.py
diff --git a/django/contrib/gis/tests/geoapp/__init__.py b/tests/gis_tests/geogapp/__init__.py
index e69de29bb2..e69de29bb2 100644
--- a/django/contrib/gis/tests/geoapp/__init__.py
+++ b/tests/gis_tests/geogapp/__init__.py
diff --git a/django/contrib/gis/tests/geogapp/fixtures/initial.json b/tests/gis_tests/geogapp/fixtures/initial.json
index 2324bcdc16..2324bcdc16 100644
--- a/django/contrib/gis/tests/geogapp/fixtures/initial.json
+++ b/tests/gis_tests/geogapp/fixtures/initial.json
diff --git a/django/contrib/gis/tests/geogapp/models.py b/tests/gis_tests/geogapp/models.py
index f6f127ca96..75102d22c9 100644
--- a/django/contrib/gis/tests/geogapp/models.py
+++ b/tests/gis_tests/geogapp/models.py
@@ -10,7 +10,6 @@ class NamedModel(models.Model):
class Meta:
abstract = True
- app_label = 'geogapp'
def __str__(self):
return self.name
@@ -19,6 +18,9 @@ class NamedModel(models.Model):
class City(NamedModel):
point = models.PointField(geography=True)
+ class Meta:
+ app_label = 'geogapp'
+
class Zipcode(NamedModel):
code = models.CharField(max_length=10)
@@ -29,5 +31,8 @@ class County(NamedModel):
state = models.CharField(max_length=20)
mpoly = models.MultiPolygonField(geography=True)
+ class Meta:
+ app_label = 'geogapp'
+
def __str__(self):
return ' County, '.join([self.name, self.state])
diff --git a/django/contrib/gis/tests/geogapp/tests.py b/tests/gis_tests/geogapp/tests.py
index 607b1175e7..e3e97f47cd 100644
--- a/django/contrib/gis/tests/geogapp/tests.py
+++ b/tests/gis_tests/geogapp/tests.py
@@ -9,10 +9,11 @@ from unittest import skipUnless
from django.contrib.gis.gdal import HAS_GDAL
from django.contrib.gis.geos import HAS_GEOS
from django.contrib.gis.measure import D
-from django.contrib.gis.tests.utils import oracle, postgis
from django.test import TestCase, skipUnlessDBFeature
from django.utils._os import upath
+from ..utils import oracle, postgis
+
if HAS_GEOS:
from .models import City, County, Zipcode
diff --git a/django/contrib/gis/tests/geogapp/__init__.py b/tests/gis_tests/geos_tests/__init__.py
index e69de29bb2..e69de29bb2 100644
--- a/django/contrib/gis/tests/geogapp/__init__.py
+++ b/tests/gis_tests/geos_tests/__init__.py
diff --git a/django/contrib/gis/geos/tests/test_geos.py b/tests/gis_tests/geos_tests/test_geos.py
index a288300f8f..9430a9b4bb 100644
--- a/django/contrib/gis/geos/tests/test_geos.py
+++ b/tests/gis_tests/geos_tests/test_geos.py
@@ -9,19 +9,21 @@ from io import BytesIO
from unittest import skipUnless
from django.contrib.gis.gdal import HAS_GDAL
-from django.contrib.gis.geometry.test_data import TestDataMixin
+from django.contrib.gis.geos import HAS_GEOS
from django.contrib.gis.shortcuts import numpy
from django.utils import six
from django.utils.encoding import force_bytes
from django.utils.six.moves import range
-from .. import HAS_GEOS
+from ..test_data import TestDataMixin
if HAS_GEOS:
- from .. import (GEOSException, GEOSIndexError, GEOSGeometry,
- GeometryCollection, Point, MultiPoint, Polygon, MultiPolygon, LinearRing,
- LineString, MultiLineString, fromfile, fromstr, geos_version_info)
- from ..base import gdal, GEOSBase
+ from django.contrib.gis.geos import (
+ GEOSException, GEOSIndexError, GEOSGeometry, GeometryCollection, Point,
+ MultiPoint, Polygon, MultiPolygon, LinearRing, LineString,
+ MultiLineString, fromfile, fromstr, geos_version_info,
+ )
+ from django.contrib.gis.geos.base import gdal, GEOSBase
@skipUnless(HAS_GEOS, "Geos is required.")
diff --git a/django/contrib/gis/geos/tests/test_geos_mutation.py b/tests/gis_tests/geos_tests/test_geos_mutation.py
index db9f12d3b6..e88339775b 100644
--- a/django/contrib/gis/geos/tests/test_geos_mutation.py
+++ b/tests/gis_tests/geos_tests/test_geos_mutation.py
@@ -5,11 +5,13 @@
import unittest
from unittest import skipUnless
-from .. import HAS_GEOS
+from django.contrib.gis.geos import HAS_GEOS
if HAS_GEOS:
- from .. import fromstr, LinearRing, LineString, MultiPoint, Point, Polygon
- from ..error import GEOSIndexError
+ from django.contrib.gis.geos import (
+ fromstr, LinearRing, LineString, MultiPoint, Point, Polygon,
+ )
+ from django.contrib.gis.geos.error import GEOSIndexError
if HAS_GEOS:
diff --git a/django/contrib/gis/geos/tests/test_io.py b/tests/gis_tests/geos_tests/test_io.py
index 08ff6c13e8..95f84bbb4f 100644
--- a/django/contrib/gis/geos/tests/test_io.py
+++ b/tests/gis_tests/geos_tests/test_io.py
@@ -4,12 +4,13 @@ import binascii
import unittest
from unittest import skipUnless
+from django.contrib.gis.geos import HAS_GEOS
from django.utils.six import memoryview
-from ..import HAS_GEOS # isort:skip
-
if HAS_GEOS:
- from .. import GEOSGeometry, WKTReader, WKTWriter, WKBReader, WKBWriter
+ from django.contrib.gis.geos import (
+ GEOSGeometry, WKTReader, WKTWriter, WKBReader, WKBWriter,
+ )
@skipUnless(HAS_GEOS, "Geos is required.")
diff --git a/django/contrib/gis/geos/tests/test_mutable_list.py b/tests/gis_tests/geos_tests/test_mutable_list.py
index cde78045f1..cde78045f1 100644
--- a/django/contrib/gis/geos/tests/test_mutable_list.py
+++ b/tests/gis_tests/geos_tests/test_mutable_list.py
diff --git a/django/contrib/gis/tests/gis_migrations/__init__.py b/tests/gis_tests/gis_migrations/__init__.py
index e69de29bb2..e69de29bb2 100644
--- a/django/contrib/gis/tests/gis_migrations/__init__.py
+++ b/tests/gis_tests/gis_migrations/__init__.py
diff --git a/django/contrib/gis/tests/gis_migrations/migrations/0001_initial.py b/tests/gis_tests/gis_migrations/migrations/0001_initial.py
index aceaaa301e..aceaaa301e 100644
--- a/django/contrib/gis/tests/gis_migrations/migrations/0001_initial.py
+++ b/tests/gis_tests/gis_migrations/migrations/0001_initial.py
diff --git a/django/contrib/gis/tests/gis_migrations/migrations/__init__.py b/tests/gis_tests/gis_migrations/migrations/__init__.py
index e69de29bb2..e69de29bb2 100644
--- a/django/contrib/gis/tests/gis_migrations/migrations/__init__.py
+++ b/tests/gis_tests/gis_migrations/migrations/__init__.py
diff --git a/django/contrib/gis/tests/gis_migrations/test_commands.py b/tests/gis_tests/gis_migrations/test_commands.py
index 076215465d..b4fe597bca 100644
--- a/django/contrib/gis/tests/gis_migrations/test_commands.py
+++ b/tests/gis_tests/gis_migrations/test_commands.py
@@ -10,7 +10,7 @@ class MigrateTests(TransactionTestCase):
"""
Tests running the migrate command in Geodjango.
"""
- available_apps = ["django.contrib.gis.tests.gis_migrations"]
+ available_apps = ["gis_tests.gis_migrations"]
def get_table_description(self, table):
with connection.cursor() as cursor:
diff --git a/django/contrib/gis/tests/gis_migrations/test_operations.py b/tests/gis_tests/gis_migrations/test_operations.py
index 9bfe55b0bf..7af8da74e5 100644
--- a/django/contrib/gis/tests/gis_migrations/test_operations.py
+++ b/tests/gis_tests/gis_migrations/test_operations.py
@@ -1,11 +1,12 @@
from __future__ import unicode_literals
-from django.contrib.gis.tests.utils import mysql
from django.db import connection, migrations, models
from django.db.migrations.migration import Migration
from django.db.migrations.state import ProjectState
from django.test import TransactionTestCase, skipUnlessDBFeature
+from ..utils import mysql
+
if connection.features.gis_enabled:
from django.contrib.gis.db.models import fields
try:
@@ -17,7 +18,7 @@ if connection.features.gis_enabled:
@skipUnlessDBFeature("gis_enabled")
class OperationTests(TransactionTestCase):
- available_apps = ["django.contrib.gis.tests.gis_migrations"]
+ available_apps = ["gis_tests.gis_migrations"]
def tearDown(self):
# Delete table after testing
diff --git a/django/contrib/gis/tests/inspectapp/__init__.py b/tests/gis_tests/inspectapp/__init__.py
index e69de29bb2..e69de29bb2 100644
--- a/django/contrib/gis/tests/inspectapp/__init__.py
+++ b/tests/gis_tests/inspectapp/__init__.py
diff --git a/django/contrib/gis/tests/inspectapp/models.py b/tests/gis_tests/inspectapp/models.py
index caf45fad9a..a649605487 100644
--- a/django/contrib/gis/tests/inspectapp/models.py
+++ b/tests/gis_tests/inspectapp/models.py
@@ -14,6 +14,3 @@ class AllOGRFields(models.Model):
point = models.PointField()
objects = models.GeoManager()
-
- class Meta:
- app_label = 'inspectapp'
diff --git a/django/contrib/gis/tests/inspectapp/tests.py b/tests/gis_tests/inspectapp/tests.py
index 8e2f54c517..19d5aa054c 100644
--- a/django/contrib/gis/tests/inspectapp/tests.py
+++ b/tests/gis_tests/inspectapp/tests.py
@@ -5,12 +5,13 @@ import re
from unittest import skipUnless
from django.contrib.gis.gdal import HAS_GDAL
-from django.contrib.gis.geometry.test_data import TEST_DATA
from django.core.management import call_command
from django.db import connection, connections
from django.test import TestCase, skipUnlessDBFeature
from django.utils.six import StringIO
+from ..test_data import TEST_DATA
+
if HAS_GDAL:
from django.contrib.gis.gdal import Driver, GDALException
from django.contrib.gis.utils.ogrinspect import ogrinspect
diff --git a/django/contrib/gis/tests/layermap/__init__.py b/tests/gis_tests/layermap/__init__.py
index e69de29bb2..e69de29bb2 100644
--- a/django/contrib/gis/tests/layermap/__init__.py
+++ b/tests/gis_tests/layermap/__init__.py
diff --git a/django/contrib/gis/tests/layermap/models.py b/tests/gis_tests/layermap/models.py
index 52483867fd..f2c7882547 100644
--- a/django/contrib/gis/tests/layermap/models.py
+++ b/tests/gis_tests/layermap/models.py
@@ -10,7 +10,6 @@ class NamedModel(models.Model):
class Meta:
abstract = True
- app_label = 'layermap'
def __str__(self):
return self.name
@@ -37,11 +36,17 @@ class City(NamedModel):
dt = models.DateField()
point = models.PointField()
+ class Meta:
+ app_label = 'layermap'
+
class Interstate(NamedModel):
length = models.DecimalField(max_digits=6, decimal_places=2)
path = models.LineStringField()
+ class Meta:
+ app_label = 'layermap'
+
# Same as `City` above, but for testing model inheritance.
class CityBase(NamedModel):
@@ -67,9 +72,6 @@ class ICity2(ICity1):
class Invalid(models.Model):
point = models.PointField()
- class Meta:
- app_label = 'layermap'
-
# Mapping dictionaries for the models above.
co_mapping = {
diff --git a/django/contrib/gis/tests/layermap/tests.py b/tests/gis_tests/layermap/tests.py
index 85f105f4a0..85f105f4a0 100644
--- a/django/contrib/gis/tests/layermap/tests.py
+++ b/tests/gis_tests/layermap/tests.py
diff --git a/django/contrib/gis/tests/maps/__init__.py b/tests/gis_tests/maps/__init__.py
index e69de29bb2..e69de29bb2 100644
--- a/django/contrib/gis/tests/maps/__init__.py
+++ b/tests/gis_tests/maps/__init__.py
diff --git a/django/contrib/gis/tests/maps/tests.py b/tests/gis_tests/maps/tests.py
index 24a9511c88..0e9635e8ef 100644
--- a/django/contrib/gis/tests/maps/tests.py
+++ b/tests/gis_tests/maps/tests.py
@@ -5,12 +5,15 @@ from unittest import skipUnless
from django.contrib.gis.geos import HAS_GEOS
from django.test import TestCase
-from django.test.utils import override_settings
+from django.test.utils import modify_settings, override_settings
GOOGLE_MAPS_API_KEY = 'XXXX'
@skipUnless(HAS_GEOS, 'Geos is required.')
+@modify_settings(
+ INSTALLED_APPS={'append': 'django.contrib.gis'},
+)
class GoogleMapsTest(TestCase):
@override_settings(GOOGLE_MAPS_API_KEY=GOOGLE_MAPS_API_KEY)
diff --git a/django/contrib/gis/tests/relatedapp/__init__.py b/tests/gis_tests/relatedapp/__init__.py
index e69de29bb2..e69de29bb2 100644
--- a/django/contrib/gis/tests/relatedapp/__init__.py
+++ b/tests/gis_tests/relatedapp/__init__.py
diff --git a/django/contrib/gis/tests/relatedapp/fixtures/initial.json b/tests/gis_tests/relatedapp/fixtures/initial.json
index e744aae03a..e744aae03a 100644
--- a/django/contrib/gis/tests/relatedapp/fixtures/initial.json
+++ b/tests/gis_tests/relatedapp/fixtures/initial.json
diff --git a/django/contrib/gis/tests/relatedapp/models.py b/tests/gis_tests/relatedapp/models.py
index 5221bbe0b1..2bcd2ebc5f 100644
--- a/django/contrib/gis/tests/relatedapp/models.py
+++ b/tests/gis_tests/relatedapp/models.py
@@ -8,7 +8,6 @@ class SimpleModel(models.Model):
class Meta:
abstract = True
- app_label = 'relatedapp'
@python_2_unicode_compatible
@@ -34,9 +33,6 @@ class AugmentedLocation(Location):
objects = models.GeoManager()
- class Meta:
- app_label = 'relatedapp'
-
class DirectoryEntry(SimpleModel):
listing_text = models.CharField(max_length=50)
diff --git a/django/contrib/gis/tests/relatedapp/tests.py b/tests/gis_tests/relatedapp/tests.py
index 28873209b9..f8e0e26105 100644
--- a/django/contrib/gis/tests/relatedapp/tests.py
+++ b/tests/gis_tests/relatedapp/tests.py
@@ -1,13 +1,14 @@
from __future__ import unicode_literals
from django.contrib.gis.geos import HAS_GEOS
-from django.contrib.gis.tests.utils import no_oracle
from django.db import connection
from django.test import TestCase, ignore_warnings, skipUnlessDBFeature
from django.test.utils import override_settings
from django.utils import timezone
from django.utils.deprecation import RemovedInDjango20Warning
+from ..utils import no_oracle
+
if HAS_GEOS:
from django.contrib.gis.db.models import Collect, Count, Extent, F, Union
from django.contrib.gis.geometry.backend import Geometry
diff --git a/django/contrib/gis/geometry/test_data.py b/tests/gis_tests/test_data.py
index 58d82dbdcc..7092bd27b1 100644
--- a/django/contrib/gis/geometry/test_data.py
+++ b/tests/gis_tests/test_data.py
@@ -5,13 +5,12 @@ for the GEOS and GDAL tests.
import json
import os
-from django.contrib import gis
from django.utils import six
from django.utils._os import upath
from django.utils.functional import cached_property
# Path where reference test data is located.
-TEST_DATA = os.path.join(os.path.dirname(upath(gis.__file__)), 'tests', 'data')
+TEST_DATA = os.path.join(os.path.dirname(upath(__file__)), 'data')
def tuplize(seq):
diff --git a/django/contrib/gis/tests/test_geoforms.py b/tests/gis_tests/test_geoforms.py
index bcbb5f0804..bcbb5f0804 100644
--- a/django/contrib/gis/tests/test_geoforms.py
+++ b/tests/gis_tests/test_geoforms.py
diff --git a/django/contrib/gis/geoip/tests.py b/tests/gis_tests/test_geoip.py
index 8d1309a671..91a84d42af 100644
--- a/django/contrib/gis/geoip/tests.py
+++ b/tests/gis_tests/test_geoip.py
@@ -11,10 +11,10 @@ from django.contrib.gis.geos import HAS_GEOS
from django.utils import six
if HAS_GEOIP:
- from . import GeoIP, GeoIPException
+ from django.contrib.gis.geoip import GeoIP, GeoIPException
if HAS_GEOS:
- from ..geos import GEOSGeometry
+ from django.contrib.gis.geos import GEOSGeometry
# Note: Requires use of both the GeoIP country and city datasets.
diff --git a/django/contrib/gis/tests/test_measure.py b/tests/gis_tests/test_measure.py
index 771c10fe9d..771c10fe9d 100644
--- a/django/contrib/gis/tests/test_measure.py
+++ b/tests/gis_tests/test_measure.py
diff --git a/django/contrib/gis/tests/test_spatialrefsys.py b/tests/gis_tests/test_spatialrefsys.py
index 1a4b151f2b..66e30f3de1 100644
--- a/django/contrib/gis/tests/test_spatialrefsys.py
+++ b/tests/gis_tests/test_spatialrefsys.py
@@ -1,13 +1,12 @@
import unittest
from django.contrib.gis.gdal import HAS_GDAL
-from django.contrib.gis.tests.utils import (
- SpatialRefSys, oracle, postgis, spatialite,
-)
from django.db import connection
from django.test import skipUnlessDBFeature
from django.utils import six
+from .utils import SpatialRefSys, oracle, postgis, spatialite
+
test_srs = ({
'srid': 4326,
'auth_name': ('EPSG', True),
diff --git a/django/contrib/gis/tests/tests.py b/tests/gis_tests/tests.py
index cc52d2429b..cc52d2429b 100644
--- a/django/contrib/gis/tests/tests.py
+++ b/tests/gis_tests/tests.py
diff --git a/django/contrib/gis/tests/utils.py b/tests/gis_tests/utils.py
index 3a43f8852b..3a43f8852b 100644
--- a/django/contrib/gis/tests/utils.py
+++ b/tests/gis_tests/utils.py
diff --git a/tests/runtests.py b/tests/runtests.py
index e8741ea56c..a24b99f17a 100755
--- a/tests/runtests.py
+++ b/tests/runtests.py
@@ -76,9 +76,10 @@ def get_test_modules():
(None, RUNTESTS_DIR),
(CONTRIB_MODULE_PATH, CONTRIB_DIR)
]
+ # GIS tests are in nested apps
if connection.features.gis_enabled:
discovery_paths.append(
- ('django.contrib.gis.tests', os.path.join(CONTRIB_DIR, 'gis', 'tests'))
+ ('gis_tests', os.path.join(RUNTESTS_DIR, 'gis_tests'))
)
for modpath, dirpath in discovery_paths:
@@ -208,6 +209,14 @@ def setup(verbosity, test_labels):
print("Importing application %s" % module_name)
settings.INSTALLED_APPS.append(module_label)
+ # Add contrib.gis to INSTALLED_APPS if needed (rather than requiring
+ # @override_settings(INSTALLED_APPS=...) on all test cases.
+ gis = 'django.contrib.gis'
+ if connection.features.gis_enabled and gis not in settings.INSTALLED_APPS:
+ if verbosity >= 2:
+ print("Importing application %s" % gis)
+ settings.INSTALLED_APPS.append(gis)
+
apps.set_installed_apps(settings.INSTALLED_APPS)
return state
diff --git a/tests/test_runner/test_discover_runner.py b/tests/test_runner/test_discover_runner.py
index 758f2d1198..70117f0327 100644
--- a/tests/test_runner/test_discover_runner.py
+++ b/tests/test_runner/test_discover_runner.py
@@ -121,9 +121,9 @@ class DiscoverRunnerTest(TestCase):
"""
Tests shouldn't be discovered twice when discovering on overlapping paths.
"""
- single = DiscoverRunner().build_suite(["django.contrib.gis"]).countTestCases()
+ single = DiscoverRunner().build_suite(["gis_tests"]).countTestCases()
dups = DiscoverRunner().build_suite(
- ["django.contrib.gis", "django.contrib.gis.tests.geo3d"]).countTestCases()
+ ["gis_tests", "gis_tests.geo3d"]).countTestCases()
self.assertEqual(single, dups)
def test_reverse(self):