'Testing LayerMapping on 3D models.'

def test01a_3d_layermapping(self):

    from models import Point2D, Point3D
    point_mapping = {'point': 'POINT'}
    mpoint_mapping = {'mpoint': 'MULTIPOINT'}
    lm = LayerMapping(Point2D, vrt_file, point_mapping, transform=False)
    lm.save()
    self.assertEqual(3, Point2D.objects.count())
    self.assertRaises(LayerMapError, LayerMapping, Point3D, city_file, point_mapping, transform=False)
    lm = LayerMapping(Point3D, vrt_file, point_mapping, transform=False)
    lm.save()
    self.assertEqual(3, Point3D.objects.count())
    lm = LayerMapping(MultiPoint3D, vrt_file, mpoint_mapping, transform=False)
    lm.save()
    self.assertEqual(3, MultiPoint3D.objects.count())
