def test_radius_for_multipoly(self):
"""
Test case for a multipolygon.
"""
multipolygon = Location.objects.get(pk=8)
actual = multipolygon.radius_km
point = shapes.reverse_coordinate_order(multipolygon.geom.centroid)
expected = vincenty(point, (20, 50)).kilometers
self.assertTrue(actual, expected)
评论列表
文章目录