summaryrefslogtreecommitdiff
path: root/tests/gis_tests
diff options
context:
space:
mode:
authorSergey Fedoseev <fedoseev.sergey@gmail.com>2015-10-30 19:47:35 +0500
committerClaude Paroz <claude@localhost.localdomain>2015-11-03 08:20:08 +0100
commita449b7ef99efdbb5edc8b4aacc89eb6020145dd3 (patch)
treebeca806df8d9f62178bb2e8db25245c87013111c /tests/gis_tests
parent1b598b4b423f7f3b63d523a4cc1e42e5364dd415 (diff)
Fixed #25629 -- Added checks of the number of arguments for GeoDjango DB functions.
Diffstat (limited to 'tests/gis_tests')
-rw-r--r--tests/gis_tests/geoapp/test_functions.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/gis_tests/geoapp/test_functions.py b/tests/gis_tests/geoapp/test_functions.py
index ff99cc4855..d778810480 100644
--- a/tests/gis_tests/geoapp/test_functions.py
+++ b/tests/gis_tests/geoapp/test_functions.py
@@ -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)