def setUp(self): Monitis.sandbox = False Monitis.debug = True self.temp_str = 'test_' + b2a_hex(urandom(4)).upper() # create an agent res = agent.add_agent(name=self.temp_str) self.agent_id = res['data'] # add a job res = agent.add_job(name=self.temp_str, params='x:ms', interval=3, agent_id=self.agent_id, type='custom') self.job_id = res['data']
def test_add_agent(self): temp_str = 'test_' + b2a_hex(urandom(4)).upper() res = agent.add_agent(name=temp_str) assert_equal(res['status'], 'ok') agent.delete_agent(agent_ids=res['data'], delete_monitors='false')