#NEWLINE# @ mock . patch ( 'six.moves.builtins.open' , side_effect = mock . mock_open ( ) ) #NEWLINE# @ mock . patch ( 'os.path.exists' , return_value = True ) #NEWLINE# @ mock . patch ( 'rally.common.objects.Deployment.get' ) #NEWLINE# @ mock . patch ( 'rally.verification.tempest.tempest.Tempest' ) #NEWLINE# def test_show_config_info_when_tempest_tree_exists_and_config_doesnt( self , mock_tempest , mock_deployment_get , mock_exists , mock_open ) : #NEWLINE# #INDENT# self . tempest . is_configured . return_value = False #NEWLINE# self . tempest . config_file = '/path/to/fake/conf' #NEWLINE# mock_tempest . return_value = self . tempest #NEWLINE# api . Verification . show_config_info ( self . deployment_uuid ) #NEWLINE# self . tempest . generate_config_file . assert_called_once_with ( ) #NEWLINE# mock_open . assert_called_once_with ( '/path/to/fake/conf' , 'rb' )