'Testing automatic transform for lookups and inserts.'

@skipUnlessDBFeature('supports_transform')
def test_lookup_insert_transform(self):

    sa_4326 = 'POINT    (-98.493183    29.424170)'
    wgs_pnt = fromstr(sa_4326, srid=4326)
    other_srid_pnt = wgs_pnt.transform(3857, clone=True)
    if oracle:
        tx = Country.objects.get(mpoly__contains=other_srid_pnt)
    else:
        tx = Country.objects.get(mpoly__intersects=other_srid_pnt)
    self.assertEqual('Texas', tx.name)
    sa = City.objects.create(name='San    Antonio', point=other_srid_pnt)
    sa = City.objects.get(name='San    Antonio')
    self.assertAlmostEqual(wgs_pnt.x, sa.point.x, 6)
    self.assertAlmostEqual(wgs_pnt.y, sa.point.y, 6)
    m1 = MinusOneSRID(geom=Point(17, 23, srid=4326))
    m1.save()
    self.assertEqual((-1), m1.geom.srid)
