Fixed #24687 -- Added select_related() validation for nested non-relational fields.

The removed test was added in the original select_related() validation
patch (45d4e43d2d), but there doesn't
seem to be any reason for it.

Thanks Claude Paroz for help and review.
This commit is contained in:
Tim Graham 2015-10-09 21:03:04 -04:00
parent 5171f56fae
commit 67732a9b18
7 changed files with 31 additions and 13 deletions

View file

@ -62,6 +62,9 @@ class RelatedGeoModelTest(TestCase):
qs = list(City.objects.filter(name=name).transform(srid, field_name='location__point'))
check_pnt(GEOSGeometry(wkt, srid), qs[0].location.point)
# Relations more than one level deep can be queried.
self.assertEqual(list(Parcel.objects.transform(srid, field_name='city__location__point')), [])
@skipUnlessDBFeature("supports_extent_aggr")
def test_related_extent_aggregate(self):
"Testing the `Extent` aggregate on related geographic models."