'Testing the Extent3D aggregate for 3D models.'

def test_extent(self):

    self._load_city_data()
    ref_extent3d = ((-123.305196), (-41.315268), 14, 174.783117, 48.462611, 1433)
    extent1 = City3D.objects.aggregate(Extent3D(u'point'))[u'point__extent3d']
    extent2 = City3D.objects.extent3d()
    def check_extent3d(extent3d, tol=6):
        for (ref_val, ext_val) in zip(ref_extent3d, extent3d):
            self.assertAlmostEqual(ref_val, ext_val, tol)
    for e3d in [extent1, extent2]:
        check_extent3d(e3d)
