'Testing the `MakeLine` aggregate.'

def test_make_line(self):

    if (not connection.features.supports_make_line_aggr):
        with self.assertRaises(NotImplementedError):
            City.objects.all().aggregate(MakeLine('point'))
        return
    self.assertIsNone(State.objects.aggregate(MakeLine('poly'))['poly__makeline'])
    ref_line = GEOSGeometry('LINESTRING(-95.363151    29.763374,-96.801611    32.782057,-97.521157    34.464642,174.783117    -41.315268,-104.609252    38.255001,-95.23506    38.971823,-87.650175    41.850385,-123.305196    48.462611)', srid=4326)
    line = City.objects.aggregate(MakeLine('point'))['point__makeline']
    self.assertTrue(ref_line.equals_exact(line, tolerance=0.0001), ('%s    !=    %s' % (ref_line, line)))
