def METHOD_NAME(self, app):
    locales_mapping = [
        ('zh_TW', 'zh_Hant_TW'),
        ('zh_CN', 'zh_Hans_CN'),
    ]
    for locale in locales_mapping:
        legacy_locale = locale[0]
        new_locale = locale[1]
        response = app.get('/{}/'.format(legacy_locale), follow_redirects=False)
        assert response.status_code == 308
        assert (
            response.headers['Location'] ==
            'http://test.ckan.net/{}'.format(new_locale)
        )
        response = app.get('/{}/dataset'.format(legacy_locale), follow_redirects=False)
        assert response.status_code == 308
        assert (
            response.headers['Location'] ==
            'http://test.ckan.net/{}/dataset'.format(new_locale)
        )