def test_get_countries_by_calling_code(countries_map, calling_code, country_name): """ Test that countries can be retrieved by calling code. """ countries = rapi.get_countries_by_calling_code(calling_code) assert countries == [countries_map[country_name]]
def test_get_countries_by_calling_code_with_filter(countries_map, calling_code, country_name): """ Test that countries can be retrieved by calling code and the response is filtered. """ countries = rapi.get_countries_by_calling_code(calling_code, filters=["name"]) assert countries == [countries_map[country_name]]