def test_choices_conflicts(self):
        class DummyPlugin(plugins.BeetsPlugin):
            def __init__(self):
                super(DummyPlugin, self).__init__()
                self.register_listener('before_choose_candidate',
                                       self.return_choices)

            def return_choices(self, session, task):
                return [ui.commands.PromptChoice('a', u'A foo', None),  # dupe
                        ui.commands.PromptChoice('z', u'baZ', None),    # ok
                        ui.commands.PromptChoice('z', u'Zupe', None),   # dupe
                        ui.commands.PromptChoice('z', u'Zoo', None)]    # dupe

        self.register_plugin(DummyPlugin)
        # Default options + not dupe extra choices by the plugin ('baZ')
        opts = (u'Apply', u'More candidates', u'Skip', u'Use as-is',
                u'as Tracks', u'Group albums', u'Enter search',
                u'enter Id', u'aBort') + (u'baZ',)
        self.importer.add_choice(action.SKIP)
        self.importer.run()
        self.mock_input_options.assert_called_once_with(opts, default='a',
                                                        require=ANY)
Test the short letter conflict solving.
dataset/ETHPy150Open beetbox/beets/test/test_plugins.py/PromptChoicesTest.test_choices_conflicts