def test_failure(self): self.setupStep(worker.MakeDirectory(dir="d")) self.expectCommands( Expect('mkdir', {'dir': 'd'}) + 1 ) self.expectOutcome(result=FAILURE, state_string="Created (failure)") return self.runStep()
def test_success(self): self.setupStep(worker.MakeDirectory(dir="d")) self.expectCommands( Expect('mkdir', {'dir': 'd'}) + 0 ) self.expectOutcome(result=SUCCESS, state_string="Created") return self.runStep()
def test_render(self): self.setupStep(worker.MakeDirectory(dir=properties.Property("x"))) self.properties.setProperty('x', 'XXX', 'here') self.expectCommands( Expect('mkdir', {'dir': 'XXX'}) + 0 ) self.expectOutcome(result=SUCCESS, state_string="Created") return self.runStep()
def test_render(self): self.setup_step(worker.MakeDirectory(dir=properties.Property("x"))) self.properties.setProperty('x', 'XXX', 'here') self.expect_commands(ExpectMkdir(dir='XXX').exit(0)) self.expect_outcome(result=SUCCESS, state_string="Created") return self.run_step()
def test_failure(self): self.setup_step(worker.MakeDirectory(dir="d")) self.expect_commands(ExpectMkdir(dir='d').exit(1)) self.expect_outcome(result=FAILURE, state_string="Create failed. (failure)") return self.run_step()
def test_success(self): self.setup_step(worker.MakeDirectory(dir="d")) self.expect_commands(ExpectMkdir(dir='d').exit(0)) self.expect_outcome(result=SUCCESS, state_string="Created") return self.run_step()