コード例 #1
0
 def test_switch_command_non_existent(self):
     try:
         swarmrob.switch_command('non_existent')
         self.fail(msg="An unknown command should throw a KeyError")
     except KeyError:
         pass
コード例 #2
0
 def test_switch_command_help(self):
     try:
         self.assertTrue(swarmrob.switch_command('help'))
     except KeyError:
         self.fail(msg="The master help command does not exist")
コード例 #3
0
 def test_switch_command_worker(self):
     try:
         self.assertFalse(swarmrob.switch_command('worker'))
     except KeyError:
         self.fail(msg="The master worker_status command does not exist")
コード例 #4
0
 def test_switch_command_check(self):
     try:
         self.assertFalse(swarmrob.switch_command('check'))
     except KeyError:
         self.fail(msg="The master start_swarm command does not exist")
コード例 #5
0
 def test_switch_command_daemon(self):
     try:
         self.assertFalse(swarmrob.switch_command('daemon'))
     except KeyError:
         self.fail(msg="The master init command does not exist")