diff --git a/tests/state/test_v2.py b/tests/state/test_v2.py
index 77c72834f2..66e3cafe8e 100644
--- a/tests/state/test_v2.py
+++ b/tests/state/test_v2.py
@@ -382,8 +382,7 @@ class StateTestCase(unittest.TestCase):
self.do_check(events, edges, expected_state_ids)
def test_mainline_sort(self):
- """Tests that the mainline ordering works correctly.
- """
+ """Tests that the mainline ordering works correctly."""
events = [
FakeEvent(
@@ -660,15 +659,27 @@ class AuthChainDifferenceTestCase(unittest.TestCase):
# C -|-> B -> A
a = FakeEvent(
- id="A", sender=ALICE, type=EventTypes.Member, state_key="", content={},
+ id="A",
+ sender=ALICE,
+ type=EventTypes.Member,
+ state_key="",
+ content={},
).to_event([], [])
b = FakeEvent(
- id="B", sender=ALICE, type=EventTypes.Member, state_key="", content={},
+ id="B",
+ sender=ALICE,
+ type=EventTypes.Member,
+ state_key="",
+ content={},
).to_event([a.event_id], [])
c = FakeEvent(
- id="C", sender=ALICE, type=EventTypes.Member, state_key="", content={},
+ id="C",
+ sender=ALICE,
+ type=EventTypes.Member,
+ state_key="",
+ content={},
).to_event([b.event_id], [])
persisted_events = {a.event_id: a, b.event_id: b}
@@ -694,19 +705,35 @@ class AuthChainDifferenceTestCase(unittest.TestCase):
# D -> C -|-> B -> A
a = FakeEvent(
- id="A", sender=ALICE, type=EventTypes.Member, state_key="", content={},
+ id="A",
+ sender=ALICE,
+ type=EventTypes.Member,
+ state_key="",
+ content={},
).to_event([], [])
b = FakeEvent(
- id="B", sender=ALICE, type=EventTypes.Member, state_key="", content={},
+ id="B",
+ sender=ALICE,
+ type=EventTypes.Member,
+ state_key="",
+ content={},
).to_event([a.event_id], [])
c = FakeEvent(
- id="C", sender=ALICE, type=EventTypes.Member, state_key="", content={},
+ id="C",
+ sender=ALICE,
+ type=EventTypes.Member,
+ state_key="",
+ content={},
).to_event([b.event_id], [])
d = FakeEvent(
- id="D", sender=ALICE, type=EventTypes.Member, state_key="", content={},
+ id="D",
+ sender=ALICE,
+ type=EventTypes.Member,
+ state_key="",
+ content={},
).to_event([c.event_id], [])
persisted_events = {a.event_id: a, b.event_id: b}
@@ -737,23 +764,43 @@ class AuthChainDifferenceTestCase(unittest.TestCase):
# |
a = FakeEvent(
- id="A", sender=ALICE, type=EventTypes.Member, state_key="", content={},
+ id="A",
+ sender=ALICE,
+ type=EventTypes.Member,
+ state_key="",
+ content={},
).to_event([], [])
b = FakeEvent(
- id="B", sender=ALICE, type=EventTypes.Member, state_key="", content={},
+ id="B",
+ sender=ALICE,
+ type=EventTypes.Member,
+ state_key="",
+ content={},
).to_event([a.event_id], [])
c = FakeEvent(
- id="C", sender=ALICE, type=EventTypes.Member, state_key="", content={},
+ id="C",
+ sender=ALICE,
+ type=EventTypes.Member,
+ state_key="",
+ content={},
).to_event([b.event_id], [])
d = FakeEvent(
- id="D", sender=ALICE, type=EventTypes.Member, state_key="", content={},
+ id="D",
+ sender=ALICE,
+ type=EventTypes.Member,
+ state_key="",
+ content={},
).to_event([c.event_id], [])
e = FakeEvent(
- id="E", sender=ALICE, type=EventTypes.Member, state_key="", content={},
+ id="E",
+ sender=ALICE,
+ type=EventTypes.Member,
+ state_key="",
+ content={},
).to_event([c.event_id, b.event_id], [])
persisted_events = {a.event_id: a, b.event_id: b}
|