#NEWLINE# def test_enabled( self ) : #NEWLINE# #INDENT# def check_enabled( ep ) : #NEWLINE# #INDENT# return ( ep . name == 't2' ) #NEWLINE# #UNINDENT# em = enabled . EnabledExtensionManager ( 'stevedore.test.extension' , check_enabled , invoke_on_load = True , invoke_args = ( 'a' , ) , invoke_kwds = { #NEWLINE# #INDENT# 'b' : 'B' , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . assertEqual ( len ( check_enabled . extensions ) , 1 ) #NEWLINE# self . assertEqual ( em . names ( ) , [ 't2' ] )