mirror of
https://github.com/django/django.git
synced 2025-11-19 03:08:59 +00:00
Replaced some GIS has_X_method skips with supports_X_aggr/has_X_function.
This commit is contained in:
parent
fdb2309604
commit
c04207cd38
4 changed files with 8 additions and 4 deletions
|
|
@ -312,7 +312,7 @@ class DistanceTest(TestCase):
|
|||
# instead (we should get the same results b/c accuracy variance won't matter
|
||||
# in this test case).
|
||||
querysets = [qs1]
|
||||
if connection.features.has_distance_spheroid_method:
|
||||
if connection.features.has_DistanceSpheroid_function:
|
||||
gq3 = Q(point__distance_lte=(wollongong.point, d1, 'spheroid'))
|
||||
gq4 = Q(point__distance_gte=(wollongong.point, d2, 'spheroid'))
|
||||
qs2 = AustraliaCity.objects.exclude(name='Wollongong').filter(gq3 | gq4)
|
||||
|
|
|
|||
|
|
@ -864,7 +864,7 @@ class GeoQuerySetTest(TestCase):
|
|||
self.assertAlmostEqual(c1[0] + xfac, c2[0], 5)
|
||||
self.assertAlmostEqual(c1[1] + yfac, c2[1], 5)
|
||||
|
||||
@skipUnlessDBFeature("has_unionagg_method")
|
||||
@skipUnlessDBFeature('supports_union_aggr')
|
||||
def test_unionagg(self):
|
||||
"""
|
||||
Testing the `Union` aggregate.
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ class RelatedGeoModelTest(TestCase):
|
|||
tol
|
||||
)
|
||||
|
||||
@skipUnlessDBFeature("has_unionagg_method")
|
||||
@skipUnlessDBFeature('supports_union_aggr')
|
||||
def test_related_union_aggregate(self):
|
||||
"Testing the `Union` aggregate on related geographic models."
|
||||
# This combines the Extent and Union aggregates into one query
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue