'Testing the `collect` GeoQuerySet method and `Collect` aggregate.'

@no_mysql
@no_oracle
@no_spatialite
def test14_collect(self):

    ref_geom = GEOSGeometry('MULTIPOINT(-97.516111    33.058333,-96.801611    32.782057,-95.363151    29.763374,-96.801611    32.782057)')
    c1 = City.objects.filter(state='TX').collect(field_name='location__point')
    c2 = City.objects.filter(state='TX').aggregate(Collect('location__point'))['location__point__collect']
    for coll in (c1, c2):
        self.assertEqual(4, len(coll))
        self.assertEqual(ref_geom, coll)
