mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #24714 -- Used more specific assertions than assertEqual in tests.
This commit is contained in:
committed by
Tim Graham
parent
3b133ffb8b
commit
eaeea6f947
@@ -56,7 +56,7 @@ class SpatialRefSysTest(unittest.TestCase):
|
||||
# the testing with the 'startswith' flag.
|
||||
auth_name, oracle_flag = sd['auth_name']
|
||||
if postgis or (oracle and oracle_flag):
|
||||
self.assertEqual(True, srs.auth_name.startswith(auth_name))
|
||||
self.assertTrue(srs.auth_name.startswith(auth_name))
|
||||
|
||||
self.assertEqual(sd['auth_srid'], srs.auth_srid)
|
||||
|
||||
@@ -71,14 +71,14 @@ class SpatialRefSysTest(unittest.TestCase):
|
||||
"""
|
||||
for sd in test_srs:
|
||||
sr = SpatialRefSys.objects.get(srid=sd['srid'])
|
||||
self.assertEqual(True, sr.spheroid.startswith(sd['spheroid']))
|
||||
self.assertTrue(sr.spheroid.startswith(sd['spheroid']))
|
||||
self.assertEqual(sd['geographic'], sr.geographic)
|
||||
self.assertEqual(sd['projected'], sr.projected)
|
||||
|
||||
if not (spatialite and not sd['spatialite']):
|
||||
# Can't get 'NAD83 / Texas South Central' from PROJ.4 string
|
||||
# on SpatiaLite
|
||||
self.assertEqual(True, sr.name.startswith(sd['name']))
|
||||
self.assertTrue(sr.name.startswith(sd['name']))
|
||||
|
||||
# Testing the SpatialReference object directly.
|
||||
if postgis or spatialite:
|
||||
|
||||
Reference in New Issue
Block a user