mirror of
https://github.com/django/django.git
synced 2025-08-04 10:59:45 +00:00
Fixed #25629 -- Added checks of the number of arguments for GeoDjango DB functions.
This commit is contained in:
parent
1b598b4b42
commit
a449b7ef99
2 changed files with 18 additions and 9 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue