def test_get_country_name_from_m49(self): assert Country.get_country_name_from_m49( 4, use_live=False) == 'Afghanistan' assert Country.get_country_name_from_m49(882, use_live=False) == 'Samoa' assert Country.get_country_name_from_m49(9999, use_live=False) is None with pytest.raises(LocationError): Country.get_country_name_from_m49(9999, use_live=False, exception=LocationError)
def test_get_country_name_from_m49(self): assert Country.get_country_name_from_m49(4) == 'Afghanistan' assert Country.get_country_name_from_m49(882) == 'Samoa' assert Country.get_country_name_from_m49(9999) is None assert Country.get_country_name_from_m49(275) == 'oPt' with pytest.raises(LocationError): Country.get_country_name_from_m49(9999, exception=LocationError)