mirror of
https://github.com/django/django.git
synced 2025-08-04 10:59:45 +00:00
Fixed #27603 -- Fixed AsKML when queryset is evaluated more than once.
This commit is contained in:
parent
7e09fa7f51
commit
e9149d3eb0
2 changed files with 7 additions and 3 deletions
|
@ -118,8 +118,11 @@ class GISFunctionsTests(TestCase):
|
|||
City.objects.annotate(kml=functions.AsKML('name'))
|
||||
|
||||
# Ensuring the KML is as expected.
|
||||
ptown = City.objects.annotate(kml=functions.AsKML('point', precision=9)).get(name='Pueblo')
|
||||
qs = City.objects.annotate(kml=functions.AsKML('point', precision=9))
|
||||
ptown = qs.get(name='Pueblo')
|
||||
self.assertEqual('<Point><coordinates>-104.609252,38.255001</coordinates></Point>', ptown.kml)
|
||||
# Same result if the queryset is evaluated again.
|
||||
self.assertEqual(qs.get(name='Pueblo').kml, ptown.kml)
|
||||
|
||||
@skipUnlessDBFeature("has_AsSVG_function")
|
||||
def test_assvg(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue