1
0
mirror of https://github.com/django/django.git synced 2025-10-26 07:06:08 +00:00

Fixed #25629 -- Added checks of the number of arguments for GeoDjango DB functions.

This commit is contained in:
Sergey Fedoseev
2015-10-30 19:47:35 +05:00
committed by Claude Paroz
parent 1b598b4b42
commit a449b7ef99
2 changed files with 18 additions and 9 deletions

View File

@@ -160,6 +160,9 @@ class GISFunctionsTests(TestCase):
for state in qs:
self.assertTrue(state.poly.centroid.equals_exact(state.centroid, tol))
with self.assertRaisesMessage(TypeError, "'Centroid' takes exactly 1 argument (2 given)"):
State.objects.annotate(centroid=functions.Centroid('poly', 'poly'))
@skipUnlessDBFeature("has_Difference_function")
def test_difference(self):
geom = Point(5, 23, srid=4326)