'Testing retrieval of SpatialRefSys model objects.'

@no_mysql
def test01_retrieve(self):

    for sd in test_srs:
        srs = SpatialRefSys.objects.get(srid=sd['srid'])
        self.assertEqual(sd['srid'], srs.srid)
        (auth_name, oracle_flag) = sd['auth_name']
        if (postgis or (oracle and oracle_flag)):
            self.assertEqual(True, srs.auth_name.startswith(auth_name))
        self.assertEqual(sd['auth_srid'], srs.auth_srid)
        if postgis:
            if (connection.ops.spatial_version >= (1, 4, 0)):
                srtext = sd['srtext14']
            else:
                srtext = sd['srtext']
            self.assertEqual(srtext, srs.wkt)
            self.assertEqual(sd['proj4'], srs.proj4text)
