def build_actions(self): self.test_dir = tempfile.mkdtemp() self.action = action.Action("Test Action") self.job = job.Job("Test Job", self.action) self.job.output_dir = self.test_dir self.mcp = mcp.MasterControlProgram(self.test_dir, "config") self.job.node_pool = node.NodePool('test hostname')
def build_job(self): self.test_dir = tempfile.mkdtemp() self.action = action.Action(name="Test Action") self.action.command = "Test Action Command" self.job = job.Job("Test Job", self.action) self.job.node_pool = node.NodePool("host") self.job.output_dir = self.test_dir self.action.job = self.job self.job.scheduler = scheduler.ConstantScheduler()
def test__eq__(self): other_pool = node.NodePool(self.nodes, 'othername') assert_equal(self.node_pool, other_pool)
def test__init__(self): new_node = node.NodePool(self.nodes, 'thename') assert_equal(new_node.name, 'thename')
def setup_nodes(self): self.nodes = [build_node(name='node%s' % i) for i in xrange(5)] self.node_pool = node.NodePool(self.nodes, 'thename')