def mock_iter_entry_points_factory(data, mocked_group):
from pkg_resources import iter_entry_points<EOL>def entrypoints(group, name=None):<EOL><INDENT>if group == mocked_group:<EOL><INDENT>for entrypoint in data:<EOL><INDENT>yield entrypoint<EOL><DEDENT><DEDENT>else:<EOL><INDENT>for x in iter_entry_points(group=group, name=name):<EOL><INDENT>yield x<EOL><DEDENT><DEDENT><DEDENT>return entrypoints<EOL>
Create a mock iter_entry_points function.