Пример #1
0
 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()
Пример #2
0
 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()
Пример #3
0
 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()
Пример #4
0
 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()
Пример #5
0
 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()
Пример #6
0
 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()