#NEWLINE# @ mock . patch . object ( shade . OpenStackCloud , 'heat_client' ) #NEWLINE# def test_list_stacks( self , mock_heat ) : #NEWLINE# #INDENT# fake_stacks = [ fakes . FakeStack ( '001' , 'stack1' ) , fakes . FakeStack ( '002' , 'stack2' ) ] #NEWLINE# mock_heat . stacks . list . return_value = fake_stacks #NEWLINE# stacks = self . cloud . list_stacks ( ) #NEWLINE# mock_heat . stacks . list . assert_called_once_with ( ) #NEWLINE# self . assertEqual ( meta . obj_list_to_dict ( fake_stacks ) , fake_stacks )