def test_restart_all(self): """Test that restart-all works""" ctllib.restartAll(self.places) fname, = os.listdir(self.places.messages) fname = os.path.join(self.places.messages, fname) d = json.loads(file(fname).read()) self.assertEquals(d, dict(type='RESTART-ALL'))
def test_extra_protection(self): """Test that messages have the PID in them""" ctllib.restartAll(self.places) fname, = os.listdir(self.places.messages) pid = str(os.getpid()) self.assertIn(pid, fname)