

def test_raw_sql_query(self):
    'Testing raw SQL query.'
    cities1 = City.objects.all()
    as_text = ('ST_AsText' if postgis else 'asText')
    cities2 = City.objects.raw(('select id, name, %s(point) from geoapp_city' % cities1))
    self.assertEqual(len(cities1), len(list(cities2)))
    self.assertTrue(isinstance(cities2[0].point, Point))

dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.5/django/contrib/gis/tests/geoapp/tests.py GeoModelTest.test_raw_sql_query/VarMisuse@43/91 `as_text`->`cities1`