'Resolve names of functions renamed and deprecated in PostGIS 2.2.0
depending on PostGIS version.
Remove when dropping support for PostGIS 2.1.'

def test_version_dependent_funcs(self):

    ops = FakePostGISOperations('2.2.0')
    self.assertEqual(ops.spatial_function_name('DistanceSphere'), 'ST_DistanceSphere')
    self.assertEqual(ops.spatial_function_name('DistanceSpheroid'), 'ST_DistanceSpheroid')
    self.assertEqual(ops.spatial_function_name('LengthSpheroid'), 'ST_LengthSpheroid')
    self.assertEqual(ops.spatial_function_name('MemSize'), 'ST_MemSize')
    ops = FakePostGISOperations('2.1.0')
    self.assertEqual(ops.spatial_function_name('DistanceSphere'), 'ST_distance_sphere')
    self.assertEqual(ops.spatial_function_name('DistanceSpheroid'), 'ST_distance_spheroid')
    self.assertEqual(ops.spatial_function_name('LengthSpheroid'), 'ST_length_spheroid')
    self.assertEqual(ops.spatial_function_name('MemSize'), 'ST_mem_size')
