Exemplo n.º 1
0
    def test_account_data_event(self):
        event = AccountDataEvent.parse_event({})

        assert isinstance(event, UnknownBadEvent)

        event = AccountDataEvent.parse_event({"type": "m.unknown", "content": {}})

        assert isinstance(event, UnknownAccountDataEvent)
Exemplo n.º 2
0
    def test_fully_read_event(self):
        parsed_dict = TestClass._load_response("tests/data/events/fully_read.json")
        event = AccountDataEvent.parse_event(parsed_dict)

        assert isinstance(event, FullyReadEvent)
Exemplo n.º 3
0
 def test_tag_event(self):
     parsed_dict = TestClass._load_response("tests/data/events/tag.json")
     event = AccountDataEvent.parse_event(parsed_dict)
     assert isinstance(event, TagEvent)