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

Commit

Permalink
Rename a test for consistency.
Browse files Browse the repository at this point in the history
  • Loading branch information
clokep committed Mar 2, 2022
1 parent 8907261 commit b0d2a59
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions tests/rest/client/test_relations.py
Original file line number Diff line number Diff line change
Expand Up @@ -1346,7 +1346,21 @@ def test_background_update(self) -> None:


class RelationRedactionTestCase(BaseRelationsTestCase):
"""Test the behaviour of relations when the parent or child event is redacted."""
"""
Test the behaviour of relations when the parent or child event is redacted.
The behaviour of each relation type is subtly different which causes the tests
to be a bit repetitive, they follow a naming scheme of:
test_redact_(relation|parent)_{relation_type}
The first bit of "relation" means that the event with the relation defined
on it (the child event) is to be redacted. A "parent" means that the target
of the relation (the parent event) is to be redacted.
The relation_type describes which type of relation is under test (i.e. it is
related to the value of rel_type in the event content).
"""

def _redact(self, event_id: str) -> None:
channel = self.make_request(
Expand Down Expand Up @@ -1533,7 +1547,7 @@ def test_redact_parent_edit(self) -> None:
self.assertEqual(len(event_ids), 0)
self.assertEqual(relations, {})

def test_redact_parent(self) -> None:
def test_redact_parent_annotation(self) -> None:
"""Test that annotations of an event are redacted when the original event
is redacted.
"""
Expand Down

0 comments on commit b0d2a59

Please sign in to comment.