def test_token(self): from supervisor.childutils import listener from supervisor.dispatchers import PEventListenerDispatcher token = PEventListenerDispatcher.READY_FOR_EVENTS_TOKEN stdout = StringIO() listener.ready(stdout) self.assertEqual(stdout.getvalue(), token)