

@no_mysql
def test_transform(self):
    'Testing the transform() GeoQuerySet method.'
    htown = fromstr('POINT(1947516.83115183 6322297.06040572)', srid=3084)
    ptown = fromstr('POINT(992363.390841912 481455.395105533)', srid=2774)
    prec = 3
    if (not oracle):
        h = City.objects.transform(htown.srid).get(name='Houston')
        self.assertEqual(3084, h.point.srid)
        self.assertAlmostEqual(htown.x, h.point.x, prec)
        self.assertAlmostEqual(htown.y, h.point.y, prec)
    p1 = City.objects.transform(ptown.srid, field_name='point').get(name='Pueblo')
    p2 = City.objects.transform(srid=ptown.srid).get(name='Pueblo')
    for p in [p1, p2]:
        self.assertEqual(2774, p1.point.srid)
        self.assertAlmostEqual(ptown.x, p.point.x, prec)
        self.assertAlmostEqual(ptown.y, p.point.y, prec)

dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.5/django/contrib/gis/tests/geoapp/tests.py GeoQuerySetTest.test_transform/VarMisuse@180/270 `p`->`p1`