

@no_mysql
def test_num_geom(self):
    'Testing the `num_geom` GeoQuerySet method.'
    for c in Country.objects.num_geom():
        self.assertEqual(2, c.num_geom)
    for c in City.objects.filter(point__isnull=False).num_geom():
        if (postgis and (connection.ops.spatial_version < (2, 0, 0))):
            self.assertIsNone(c.num_geom)
        else:
            self.assertEqual(1, c.num_geom)

dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.5/django/contrib/gis/tests/geoapp/tests.py GeoQuerySetTest.test_num_geom/original