#NEWLINE# def test_wrapped_several_times_patch( self ) : #NEWLINE# #INDENT# decorated = patch ( 'sys.modules' ) ( function ) #NEWLINE# decorated = patch ( 'sys.modules' ) ( self ) #NEWLINE# self . assertIs ( decorated . __wrapped__ , function )