Example #1
0
 def test_quit(self):
     cmd = Quit()
     arbiter = FakeArbiter()
     self.assertTrue(arbiter.watchers[0].numprocesses, 1)
     props = cmd.message('dummy')['properties']
     cmd.execute(arbiter, props)
     self.assertEqual(len(arbiter.watchers), 0)
 def test_quit(self):
     cmd = Quit()
     arbiter = FakeArbiter()
     self.assertTrue(arbiter.watchers[0].nb, 1)
     props = cmd.message('dummy')['properties']
     cmd.execute(arbiter, props)
     self.assertEqual(len(arbiter.watchers), 0)
Example #3
0
 def test_quit_async(self):
     cmd = Quit()
     arbiter = FakeArbiter()
     self.assertTrue(arbiter.watchers[0].nb, 1)
     props = cmd.message('dummy')['properties']
     props['async'] = True
     cmd.async_execute(arbiter, props)
     self.assertEqual(len(arbiter.watchers), 0)