#NEWLINE# def test_run( self ) : #NEWLINE# #INDENT# class DummySequenceCommand ( SequenceCommand ) : #NEWLINE# #INDENT# @ classmethod #NEWLINE# def _internal_commands( cls ) : #NEWLINE# #INDENT# return [ DummyFooCommand , DummyBarCommand ] #NEWLINE# #UNINDENT# #UNINDENT# env = StubEnvironment ( ) #NEWLINE# command = DummySequenceCommand ( env ) #NEWLINE# with mock . patch ( 'test.commands.test_sequence.DummyFooCommand' ) as MockFoo , mock . patch ( 'test.commands.test_sequence.DummyBarCommand' ) as MockBar : #NEWLINE# #INDENT# command . run ( ) #NEWLINE# #UNINDENT# self . assertTrue ( self . return_value . run . called ) #NEWLINE# self . assertTrue ( MockBar . return_value . run . called )