def test00a_geomtype(self):

        # OGRGeomType should initialize on all these inputs.
        try:
            g = OGRGeomType(1)
            g = OGRGeomType(7)
            g = OGRGeomType('point')
            g = OGRGeomType('GeometrycollectioN')
            g = OGRGeomType('LINearrING')
            g = OGRGeomType('Unknown')
        except:
            self.fail('Could not create an OGRGeomType object!')

        # Should throw TypeError on this input
        self.assertRaises(OGRException, OGRGeomType, 23)
        self.assertRaises(OGRException, OGRGeomType, 'fooD')
        self.assertRaises(OGRException, OGRGeomType, 9)

        # Equivalence can take strings, ints, and other OGRGeomTypes
        self.assertEqual(True, OGRGeomType(1) == OGRGeomType(1))
        self.assertEqual(True, OGRGeomType(7) == 'GeometryCollection')
        self.assertEqual(True, OGRGeomType('point') == 'POINT')
        self.assertEqual(False, OGRGeomType('point') == 2)
        self.assertEqual(True, OGRGeomType('unknown') == 0)
        self.assertEqual(True, OGRGeomType(6) == 'MULtiPolyGON')
        self.assertEqual(False, OGRGeomType(1) != OGRGeomType('point'))
        self.assertEqual(True, OGRGeomType('POINT') != OGRGeomType(6))

        # Testing the Django field name equivalent property.
        self.assertEqual('PointField', OGRGeomType('Point').django)
        self.assertEqual('GeometryField', OGRGeomType('Unknown').django)
        self.assertEqual(None, OGRGeomType('none').django)

        # 'Geometry' initialization implies an unknown geometry type.
        gt = OGRGeomType('Geometry')
        self.assertEqual(0, gt.num)
        self.assertEqual('Unknown', gt.name)
Returns the instance with the provided instance ID.
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.4/django/contrib/gis/gdal/tests/test_geom.py/OGRGeomTest.test00a_geomtype--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/tools/devappserver2/server.py/BasicScalingServer.get_instance