コード例 #1
0
 def test_add_job(self):
     res = agent.add_job(name=self.temp_str + '2',
                         params='x:ms',
                         interval=3,
                         agent_id=self.agent_id,
                         type='custom')
     assert_equal(res['status'], 'ok')
コード例 #2
0
    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']
コード例 #3
0
    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']
コード例 #4
0
 def test_add_job(self):
     res = agent.add_job(name=self.temp_str + '2', params='x:ms',
                         interval=3, agent_id=self.agent_id, type='custom')
     assert_equal(res['status'], 'ok')