def because_we_add_a_message(self): msg = Event(self.message_id, "type", {}, "stream", self.sequence_no) asyncio.ensure_future(self.send_message(msg), loop=self._loop) self._loop.run_until_complete(self.message_processor.consume_events())
def because_we_process_a_message(self): with (self._log.capture()): msg = Event(self.message_id, "message-type", {}, "stream", 2) asyncio.ensure_future(self.send_message(msg), loop=self._loop) self._loop.run_until_complete(self.event_raiser.start())
def because_we_add_a_message(self): msg = Event(self.message_id, "type", {}, "stream", self.sequence_no) asyncio. async (self.send_message(msg), loop=self._loop) self._loop.run_until_complete(self.message_processor.start())