mirror of
https://github.com/element-hq/synapse.git
synced 2026-06-01 10:54:37 +00:00
Remove getitem
This commit is contained in:
@@ -288,9 +288,6 @@ class EventBase(metaclass=abc.ABCMeta):
|
||||
|
||||
return template_json
|
||||
|
||||
def __getitem__(self, field: str) -> Any | None:
|
||||
return self._dict[field]
|
||||
|
||||
def __contains__(self, field: str) -> bool:
|
||||
return field in self._dict
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#
|
||||
#
|
||||
import logging
|
||||
from typing import Collection, cast
|
||||
from typing import Collection
|
||||
from unittest import TestCase
|
||||
from unittest.mock import AsyncMock, Mock, patch
|
||||
|
||||
@@ -140,7 +140,7 @@ class FederationTestCase(unittest.FederatingHomeserverTestCase):
|
||||
"content": {},
|
||||
"room_id": room_id,
|
||||
"sender": "@yetanotheruser:" + OTHER_SERVER,
|
||||
"depth": cast(int, join_event["depth"]) + 1,
|
||||
"depth": join_event.depth + 1,
|
||||
"prev_events": [join_event.event_id],
|
||||
"auth_events": [],
|
||||
"origin_server_ts": self.clock.time_msec(),
|
||||
@@ -192,7 +192,7 @@ class FederationTestCase(unittest.FederatingHomeserverTestCase):
|
||||
"content": {},
|
||||
"room_id": room_id,
|
||||
"sender": "@yetanotheruser:" + OTHER_SERVER,
|
||||
"depth": cast(int, join_event["depth"]) + 1,
|
||||
"depth": join_event.depth + 1,
|
||||
"prev_events": [join_event.event_id],
|
||||
"auth_events": [],
|
||||
"origin_server_ts": self.clock.time_msec(),
|
||||
|
||||
Reference in New Issue
Block a user