#NEWLINE# def test_plugin_choices_in_ui_input_options_album( self ) : #NEWLINE# #INDENT# 'Test the presence of plugin choices on the prompt (album).' #NEWLINE# class DummyPlugin ( plugins . BeetsPlugin ) : #NEWLINE# #INDENT# def __init__( self ) : #NEWLINE# #INDENT# super ( DummyPlugin , self ) . __init__ ( ) #NEWLINE# self . register_listener ( 'before_choose_candidate' , self . return_choices ) #NEWLINE# #UNINDENT# def return_choices( self , session , task ) : #NEWLINE# #INDENT# return [ ui . commands . PromptChoice ( 'f' , 'Foo' , None ) , ui . commands . PromptChoice ( 'r' , 'baR' , None ) ] #NEWLINE# #UNINDENT# #UNINDENT# self . register_plugin ( DummyPlugin ) #NEWLINE# opts = ( ( 'Apply' , 'More candidates' , 'Skip' , 'Use as-is' , 'as Tracks' , 'Group albums' , 'Enter search' , 'enter Id' , 'aBort' ) + ( 'Foo' , 'baR' ) ) #NEWLINE# self . importer . add_choice ( action . SKIP ) #NEWLINE# self . importer . run ( ) #NEWLINE# self . mock_input_options . assert_called_once_with ( self , default = 'a' , require = ANY )