'Test fix_baselayers function, used by the fix_baselayers command'

def test_fix_baselayers(self):

    map_id = 1
    map_obj = Map.objects.get(id=map_id)
    n_baselayers = (len(settings.MAP_BASELAYERS) - 1)
    n_locallayers = map_obj.layer_set.filter(local=True).count()
    fix_baselayers(map_id)
    self.assertEquals(map_obj.layer_set.all().count(), (n_baselayers + n_locallayers))
