summaryrefslogtreecommitdiff
path: root/tests/gis_tests/test_spatialrefsys.py
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2016-12-07 17:42:31 -0500
committerGitHub <noreply@github.com>2016-12-07 17:42:31 -0500
commitb5f0b3478dfcf0335f8ac2038d59f54b4a05f2a0 (patch)
treef3eb61bfdcf45c7b27fe3c480e9a7533746d1aad /tests/gis_tests/test_spatialrefsys.py
parentf909fa84bedb51778a175aadfe4cfe7a91fe06cd (diff)
Fixed #27579 -- Added aliases for Python 3's assertion names in SimpleTestCase.
Diffstat (limited to 'tests/gis_tests/test_spatialrefsys.py')
-rw-r--r--tests/gis_tests/test_spatialrefsys.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/tests/gis_tests/test_spatialrefsys.py b/tests/gis_tests/test_spatialrefsys.py
index 93ff3f6263..90e8084af1 100644
--- a/tests/gis_tests/test_spatialrefsys.py
+++ b/tests/gis_tests/test_spatialrefsys.py
@@ -1,8 +1,6 @@
import re
-import unittest
-from django.test import skipUnlessDBFeature
-from django.utils import six
+from django.test import TestCase, skipUnlessDBFeature
from .utils import SpatialRefSys, oracle, postgis, spatialite
@@ -51,7 +49,7 @@ test_srs = ({
@skipUnlessDBFeature("has_spatialrefsys_table")
-class SpatialRefSysTest(unittest.TestCase):
+class SpatialRefSysTest(TestCase):
def test_get_units(self):
epsg_4326 = next(f for f in test_srs if f['srid'] == 4326)
@@ -79,7 +77,7 @@ class SpatialRefSysTest(unittest.TestCase):
# No proj.4 and different srtext on oracle backends :(
if postgis:
self.assertTrue(srs.wkt.startswith(sd['srtext']))
- six.assertRegex(self, srs.proj4text, sd['proj4_re'])
+ self.assertRegex(srs.proj4text, sd['proj4_re'])
def test_osr(self):
"""
@@ -99,7 +97,7 @@ class SpatialRefSysTest(unittest.TestCase):
# Testing the SpatialReference object directly.
if postgis or spatialite:
srs = sr.srs
- six.assertRegex(self, srs.proj4, sd['proj4_re'])
+ self.assertRegex(srs.proj4, sd['proj4_re'])
self.assertTrue(srs.wkt.startswith(sd['srtext']))
def test_ellipsoid(self):