def METHOD_NAME(self, generator):
    with pytest.raises(AttributeError) as excinfo:
        generator.get_formatter("barFormatter")
    assert str(excinfo.value) == "Unknown formatter 'barFormatter'"
    fake = Faker("it_IT")
    with pytest.raises(AttributeError) as excinfo:
        fake.get_formatter("barFormatter")
    assert str(excinfo.value) == "Unknown formatter 'barFormatter' with locale 'it_IT'"