mirror of
https://github.com/django/django.git
synced 2025-10-29 00:26:07 +00:00
[1.10.x] Fixed #26747 -- Used more specific assertions in the Django test suite.
Backport of 4f336f6652 from master
This commit is contained in:
@@ -241,8 +241,8 @@ class GISFunctionsTests(TestCase):
|
||||
State.objects.create(name='invalid', poly=invalid_geom)
|
||||
valid = State.objects.filter(name='valid').annotate(isvalid=functions.IsValid('poly')).first()
|
||||
invalid = State.objects.filter(name='invalid').annotate(isvalid=functions.IsValid('poly')).first()
|
||||
self.assertEqual(valid.isvalid, True)
|
||||
self.assertEqual(invalid.isvalid, False)
|
||||
self.assertIs(valid.isvalid, True)
|
||||
self.assertIs(invalid.isvalid, False)
|
||||
|
||||
@skipUnlessDBFeature("has_Area_function")
|
||||
def test_area_with_regular_aggregate(self):
|
||||
@@ -265,7 +265,7 @@ class GISFunctionsTests(TestCase):
|
||||
invalid_geom = fromstr('POLYGON((0 0, 0 1, 1 1, 1 0, 1 1, 1 0, 0 0))')
|
||||
State.objects.create(name='invalid', poly=invalid_geom)
|
||||
invalid = State.objects.filter(name='invalid').annotate(repaired=functions.MakeValid('poly')).first()
|
||||
self.assertEqual(invalid.repaired.valid, True)
|
||||
self.assertIs(invalid.repaired.valid, True)
|
||||
self.assertEqual(invalid.repaired, fromstr('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))'))
|
||||
|
||||
@skipUnlessDBFeature("has_MemSize_function")
|
||||
|
||||
Reference in New Issue
Block a user