def test_match_country_name_doesnt_crash_when_disambiguating_koreas(): assert match_country_name_to_its_code('Korea') is None
def test_match_country_name_disambiguates_koreas_when_given_a_city(): expected = 'KR' result = match_country_name_to_its_code('Korea', city='Seoul') assert expected == result
def test_match_country_name_to_its_code_ignores_case(): expected = 'AL' result = match_country_name_to_its_code('Albania') assert expected == result
def test_match_country_name_to_its_code_uses_alternative_spellings(): expected = 'AM' result = match_country_name_to_its_code('Republic of Armenia') assert expected == result
def test_match_country_name_to_its_code_fetches_from_country_to_iso_code(): expected = 'AF' result = match_country_name_to_its_code('AFGHANISTAN') assert expected == result