Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(41)  |  Call(41)  |  Derive(0)  |  Import(0)

src/m/i/milkcheck-HEAD/tests/MilkCheckTests/EngineTests/ServiceTest.py   milkcheck(Download)
        ac_start = Action(name='start', command='/bin/true')
        serv_test.add_action(ac_start)
        serv_test.run('start')
        self.assertTrue(serv_test.origin)
        self.assertEqual(serv_test.status, DONE)
 
        # Start preparing of the base service
        serv_test.run('start')
        self.assertEqual(serv_test.status, DONE)
        self.assertEqual(serv_dep.status, DONE)
        serv_test.add_dep(serv_depb)
 
        serv_test.run('start')
        self.assertEqual(serv_test.status, DONE)
        self.assertEqual(serv_depa.status, DONE)
        svc.add_action(action)
        action.update_target("TEMPNODE", 'DIF')
        svc.run('start')
 
        self.assertEqual(action.status, SKIPPED)
        self.assertEqual(serv_test.eval_deps_status(), SKIPPED)
 
        serv_test.run('start')
        self.assertEqual(serv_test.status, DONE)
        self.assertEqual(serv_depa.status, SKIPPED)

src/m/i/milkcheck-HEAD/tests/MilkCheckTests/EngineTests/ActionTest.py   milkcheck(Download)
 
        svc.add_dep(dep)
        svc.run('start')
 
        self.assertEqual(dep.status, ERROR)
        service = Service('test_service')
        service.add_action(action)
        service.run('start')
        self.assertEqual(action.nb_errors(), 3)
        self.assertEqual(action.status, ERROR)
        service = Service('test_service')
        service.add_action(action)
        service.run('test')
        self.assertEqual(action.nb_errors(), 0)
        self.assertEqual(action.status, DONE)
        act_test = Action(name='test', command='/bin/true')
        service.add_action(act_test)
        service.run('test')
        self.assertEqual(act_test.nb_errors(), 0)
        self.assertEqual(act_test.status, DONE)
 
        service.reset()
        act_test.errors = 1
        act_test.command = '/bin/false'
        service.run('test')