How to use the geonamescache.mappers.country function in geonamescache

To help you get started, we’ve selected a few geonamescache examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github yaph / geonamescache / tests / test_mappings.py View on Github external
def test_country_name_iso3_mapper(self):
        mapper = country(from_key='name', to_key='iso3')
        self.assertEquals(mapper('Burma'), 'MMR')
        self.assertEquals(mapper('South Korea'), 'KOR')
        self.assertEquals(mapper('The Netherlands'), 'NLD')
        self.assertEquals(mapper('USA'), 'USA')