'Using a queryset inside a geo lookup is working (using a subquery)
(#14483).'

def test_within_subquery(self):

    tex_cities = City.objects.filter(point__within=Country.objects.filter(name='Texas').values('mpoly')).order_by('name')
    expected = ['Dallas', 'Houston']
    if (not connection.features.supports_real_shape_operations):
        expected.append('Oklahoma    City')
    self.assertEqual(list(tex_cities.values_list('name', flat=True)), expected)
