@mock.patch(COUNTRY_ISO_CODE)
def test_invalid_countries_data_is_none(self, mocked_country_iso_code):
    test_df = pd.DataFrame({'index': [0, 1, 2], 'country': ['United Kingdom', 'Belgium', 'United States']})
    mocked_country_iso_code.side_effect = KeyError
    expected_dataframe = pd.DataFrame({'index': [0, 1, 2], 'country': ['United Kingdom', 'Belgium', 'United States'], 'country_alpha_2': [None, None, None], 'country_alpha_3': [None, None, None], 'country_numeric': [None, None, None], 'continent': [None, None, None]})
    coded_df = country_iso_code_dataframe(test_df)
    assert (coded_df.to_dict(orient='records') == expected_dataframe.to_dict(orient='records'))
@mock.patch(COUNTRY_ISO_CODE)
def test_invalid_countries_data_is_none(self, mocked_country_iso_code):
    test_df = pd.DataFrame({'index': [0, 1, 2], 'country': ['United Kingdom', 'Belgium', 'United States']})
    mocked_country_iso_code.side_effect = KeyError
    expected_dataframe = pd.DataFrame({'index': [0, 1, 2], 'country': ['United Kingdom', 'Belgium', 'United States'], 'country_alpha_2': [None, None, None], 'country_alpha_3': [None, None, None], 'country_numeric': [None, None, None], 'continent': [None, None, None]})
    coded_df = country_iso_code_dataframe(test_df)
    assert (coded_df.to_dict(orient='records') == expected_dataframe.to_dict(orient='records'))