'Testing the `scale` GeoQuerySet method.'

@no_mysql
@no_oracle
def test_scale(self):

    (xfac, yfac) = (2, 3)
    tol = 5
    qs = Country.objects.scale(xfac, yfac, model_att='scaled')
    for c in qs:
        for (p1, p2) in zip(c.mpoly, c.scaled):
            for (r1, r2) in zip(p1, p2):
                for (c1, c2) in zip(r1.coords, r2.coords):
                    self.assertAlmostEqual((c1[0] * xfac), c2[0], tol)
                    self.assertAlmostEqual((c1[1] * yfac), c2[1], tol)
