Esempio n. 1
0
    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__)
Esempio n. 2
0
 def create(self, evt):
     return events.build(evt)(None, evt)