<s> """<STR_LIT>""" <EOL> __docformat__ = "<STR_LIT>" <EOL> import uuid <EOL> import time <EOL> import requests <EOL> from datetime import datetime <EOL> from pprint import pprint , pformat <EOL> from nose . tools import raises <EOL> from tests import ( <EOL> rundeck_client , <EOL> rundeck_api , <EOL> test_job_id , <EOL> test_job_name , <EOL> test_job_proj , <EOL> test_job_def_tmpl , <EOL> transforms , <EOL> RundeckNode , <EOL> ) <EOL> del_test_job_id = str ( uuid . uuid4 ( ) ) <EOL> bulk1_del_test_job_id = str ( uuid . uuid4 ( ) ) <EOL> bulk2_del_test_job_id = str ( uuid . uuid4 ( ) ) <EOL> imp_test_job_id = str ( uuid . uuid4 ( ) ) <EOL> def setup ( ) : <EOL> rundeck_api . jobs_import ( <EOL> test_job_def_tmpl . format ( <EOL> del_test_job_id , test_job_name + '<STR_LIT>' , test_job_proj ) ) <EOL> rundeck_api . jobs_import ( <EOL> test_job_def_tmpl . format ( <EOL> bulk1_del_test_job_id , test_job_name + '<STR_LIT>' , test_job_proj ) ) <EOL> rundeck_api . jobs_import ( <EOL> test_job_def_tmpl . format ( <EOL> bulk2_del_test_job_id , test_job_name + '<STR_LIT>' , test_job_proj ) ) <EOL> time . sleep ( <NUM_LIT:3> ) <EOL> def teardown ( ) : <EOL> pass <EOL> @ raises ( NotImplementedError ) <EOL> def test_node_xml ( ) : <EOL> raise NotImplementedError ( '<STR_LIT>' ) <EOL> @ raises ( NotImplementedError ) <EOL> def test_exec ( ) : <EOL> time . sleep ( <NUM_LIT:1> ) <EOL> raise NotImplementedError ( '<STR_LIT>' ) <EOL> def test_system_info ( ) : <EOL> time . sleep ( <NUM_LIT:1> ) <EOL> assert rundeck_api . system_info ( ) . success , '<STR_LIT>' <EOL> def test_jobs ( ) : <EOL> time . sleep ( <NUM_LIT:1> ) <EOL> assert rundeck_api . jobs ( test_job_proj ) . success , '<STR_LIT>' <EOL> def test_project_jobs ( ) : <EOL> time . sleep ( <NUM_LIT:1> ) <EOL> assert rundeck_api . project_jobs ( test_job_proj ) . success , '<STR_LIT>' <EOL> def test_job_run ( ) : <EOL> time . sleep ( <NUM_LIT:3> ) <EOL> assert rundeck_api . job_run ( test_job_id ) . success , '<STR_LIT>' <EOL> time . sleep ( <NUM_LIT:3> ) <EOL> assert rundeck_api . job_run ( test_job_id , argString = { '<STR_LIT>' : '<STR_LIT>' } ) . success , '<STR_LIT>' <EOL> time . sleep ( <NUM_LIT:3> ) <EOL> assert rundeck_api . job_run ( test_job_id , argString = '<STR_LIT>' ) . success , '<STR_LIT>' <EOL> def test_jobs_export ( ) : <EOL> time . sleep ( <NUM_LIT:1> ) <EOL> assert rundeck_api . jobs_export ( test_job_proj ) . status_code == requests . codes . ok , '<STR_LIT>' <EOL> @ raises ( NotImplementedError ) <EOL> def test_jobs_import ( ) : <EOL> time . sleep ( <NUM_LIT:1> ) <EOL> raise NotImplementedError ( '<STR_LIT>' ) <EOL> def test_job ( ) : <EOL> time . sleep ( <NUM_LIT:1> ) <EOL> assert rundeck_api . job ( test_job_id ) . status_code == requests . codes . ok , '<STR_LIT>' <EOL> def test_delete_job ( ) : <EOL> time . sleep ( <NUM_LIT:1> ) <EOL> response = rundeck_api . delete_job ( del_test_job_id ) <EOL> assert response . status_code in ( requests . codes . no_content , requests . codes . ok ) , '<STR_LIT>' <EOL> def test_jobs_delete ( ) : <EOL> time . sleep ( <NUM_LIT:1> ) <EOL> assert rundeck_api . jobs_delete ( [ bulk1_del_test_job_id , bulk2_del_test_job_id ] ) . success , '<STR_LIT>' <EOL> def test_job_executions ( ) : <EOL> time . sleep ( <NUM_LIT:1> ) <EOL> assert rundeck_api . job_executions ( test_job_id ) . success , '<STR_LIT>' <EOL> def test_executions_running ( ) : <EOL> time . sleep ( <NUM_LIT:1> ) <EOL> assert rundeck_api . executions_running ( test_job_proj ) . success , '<STR_LIT>' <EOL> def test_execution ( ) : <EOL> time . sleep ( <NUM_LIT:1> ) <EOL> execution = transforms [ '<STR_LIT>' ] ( rundeck_api . job_run ( test_job_id ) ) <EOL> time . sleep ( <NUM_LIT:1> ) <EOL> execution_id = execution [ '<STR_LIT:id>' ] <EOL> assert rundeck_api . execution ( execution_id ) . success , '<STR_LIT>' <EOL> def test_executions ( ) : <EOL> time . sleep ( <NUM_LIT:1> ) <EOL> assert rundeck_api . executions ( test_job_proj ) . success , '<STR_LIT>' <EOL> def test_execution_output ( ) : <EOL> time . sleep ( <NUM_LIT:1> ) <EOL> execution = transforms [ '<STR_LIT>' ] ( rundeck_api . job_run ( test_job_id ) ) <EOL> time . sleep ( <NUM_LIT:1> ) <EOL> execution_id = execution [ '<STR_LIT:id>' ] <EOL> assert rundeck_api . execution_output ( execution_id ) . status_code == requests . codes . ok , '<STR_LIT>' <EOL> def test_execution_abort ( ) : <EOL> time . sleep ( <NUM_LIT:1> ) <EOL> execution = transforms [ '<STR_LIT>' ] ( rundeck_api . job_run ( test_job_id , argString = { '<STR_LIT>' : <NUM_LIT:30> } ) ) <EOL> time . sleep ( <NUM_LIT:1> ) <EOL> execution_id = execution [ '<STR_LIT:id>' ] <EOL> assert rundeck_api . execution_abort ( execution_id ) . success , '<STR_LIT>' <EOL> time . sleep ( <NUM_LIT:1> ) <EOL> execution = transforms [ '<STR_LIT>' ] ( rundeck_api . execution ( execution_id ) ) <EOL> assert execution [ '<STR_LIT:status>' ] == '<STR_LIT>' , '<STR_LIT>' <EOL> @ raises ( NotImplementedError ) <EOL> def test_run_command ( ) : <EOL> time . sleep ( <NUM_LIT:1> ) <EOL> raise NotImplementedError ( '<STR_LIT>' ) <EOL> @ raises ( NotImplementedError ) <EOL> def test_run_script ( ) : <EOL> time . sleep ( <NUM_LIT:1> ) <EOL> raise NotImplementedError ( '<STR_LIT>' ) <EOL> @ raises ( NotImplementedError ) <EOL> def test_run_url ( ) : <EOL> time . sleep ( <NUM_LIT:1> ) <EOL> raise NotImplementedError ( '<STR_LIT>' ) <EOL> def test_projects ( ) : <EOL> time . sleep ( <NUM_LIT:1> ) <EOL> assert rundeck_api . projects ( ) . success , '<STR_LIT>' <EOL> def test_project ( ) : <EOL> time . sleep ( <NUM_LIT:1> ) <EOL> assert rundeck_api . project ( test_job_proj ) . success , '<STR_LIT>' <EOL> @ raises ( NotImplementedError ) <EOL> def test_project_resources ( ) : <EOL> time . sleep ( <NUM_LIT:1> ) <EOL> raise NotImplementedError ( '<STR_LIT>' ) <EOL> def test_project_resources_update ( ) : <EOL> time . sleep ( <NUM_LIT:1> ) <EOL> host1 = RundeckNode ( <EOL> '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , description = '<STR_LIT>' , tags = [ '<STR_LIT>' ] , <EOL> attributes = { '<STR_LIT:foo>' : '<STR_LIT:bar>' } <EOL> ) <EOL> assert rundeck_api . project_resources_update ( test_job_proj , [ host1 ] ) . success , '<STR_LIT>' <EOL> @ raises ( NotImplementedError ) <EOL> def test_project_resources_refresh ( ) : <EOL> time . sleep ( <NUM_LIT:1> ) <EOL> raise NotImplementedError ( '<STR_LIT>' ) <EOL> @ raises ( NotImplementedError ) <EOL> def test_history ( ) : <EOL> time . sleep ( <NUM_LIT:1> ) <EOL> raise NotImplementedError ( '<STR_LIT>' ) </s>
