Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit b0d2a59

Browse files
committed
Rename a test for consistency.
1 parent 8907261 commit b0d2a59

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

tests/rest/client/test_relations.py

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1346,7 +1346,21 @@ def test_background_update(self) -> None:
13461346

13471347

13481348
class RelationRedactionTestCase(BaseRelationsTestCase):
1349-
"""Test the behaviour of relations when the parent or child event is redacted."""
1349+
"""
1350+
Test the behaviour of relations when the parent or child event is redacted.
1351+
1352+
The behaviour of each relation type is subtly different which causes the tests
1353+
to be a bit repetitive, they follow a naming scheme of:
1354+
1355+
test_redact_(relation|parent)_{relation_type}
1356+
1357+
The first bit of "relation" means that the event with the relation defined
1358+
on it (the child event) is to be redacted. A "parent" means that the target
1359+
of the relation (the parent event) is to be redacted.
1360+
1361+
The relation_type describes which type of relation is under test (i.e. it is
1362+
related to the value of rel_type in the event content).
1363+
"""
13501364

13511365
def _redact(self, event_id: str) -> None:
13521366
channel = self.make_request(
@@ -1533,7 +1547,7 @@ def test_redact_parent_edit(self) -> None:
15331547
self.assertEqual(len(event_ids), 0)
15341548
self.assertEqual(relations, {})
15351549

1536-
def test_redact_parent(self) -> None:
1550+
def test_redact_parent_annotation(self) -> None:
15371551
"""Test that annotations of an event are redacted when the original event
15381552
is redacted.
15391553
"""

0 commit comments

Comments
 (0)