Exemple #1
0
 def test_command_finished(self):
     command = Command('command-1')
     assert_that(command.is_finished(), is_(False))
     command.start()
     assert_that(command.is_finished(), is_(False))
     command.done()
     assert_that(command.is_finished(), is_(True))
Exemple #2
0
 def test_command_state(self):
     command = Command('command-1')
     assert_that(command.state(), is_(State.QUEUED))
     command.start()
     assert_that(command.state(), is_(State.STARTED))
     command.done()
     assert_that(command.state(), is_(State.DONE))