diff options
| author | Sander Smits <sander.smits@nelen-schuurmans.nl> | 2015-01-16 20:10:25 +0100 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2015-01-16 20:10:25 +0100 |
| commit | 374c2419e5adef53a643bf69c4753a6bf0c78a98 (patch) | |
| tree | 5b44f416744f0b30ea4d93a327c79ce93fb9f56b | |
| parent | a79e6b67175f532049967268c10609af6d31d140 (diff) | |
Tested that geo aggregates support slicing
Refs #15101. Patch slightly reworked by Claude Paroz.
| -rw-r--r-- | django/contrib/gis/tests/geoapp/tests.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/django/contrib/gis/tests/geoapp/tests.py b/django/contrib/gis/tests/geoapp/tests.py index c98d244235..b5b765d21b 100644 --- a/django/contrib/gis/tests/geoapp/tests.py +++ b/django/contrib/gis/tests/geoapp/tests.py @@ -493,6 +493,15 @@ class GeoQuerySetTest(TestCase): self.assertIsNone(City.objects.filter(name=('Smalltown')).extent()) self.assertIsNone(City.objects.filter(name=('Smalltown')).aggregate(Extent('point'))['point__extent']) + @skipUnlessDBFeature("supports_extent_aggr") + def test_extent_with_limit(self): + """ + Testing if extent supports limit. + """ + extent1 = City.objects.all().aggregate(Extent('point'))['point__extent'] + extent2 = City.objects.all()[:3].aggregate(Extent('point'))['point__extent'] + self.assertNotEqual(extent1, extent2) + @skipUnlessDBFeature("has_force_rhr_method") def test_force_rhr(self): "Testing GeoQuerySet.force_rhr()." |
