import unittest import swiftstory.SwiftStory as SwiftStory from swiftstory.Status import error class TestSwiftStory(unittest.TestCase): def test_invalid_message_received(self): self.assertEqual( error("badly formatted json"), SwiftStory.message_received_handler(client=None, message="{invalid_json}") )