def test_detect(self): """ Event type is properly detected Events coming in should be built with the proper event constructor based on the type of event """ detections = [("Channel", "channel_created"), ("Event", "generic"), ("Message", "message")] for type, event in detections: self.assertEqual(type, events.build({"type": event}).__name__)
def create(self, evt): return events.build(evt)(None, evt)