Change new test_validate_new_with_mentions_succeeds_even_when_frozen test

Since we no longer have an `event.freeze()` we simply test that the
validator works on the (already frozen) event.

Test was introduced in #19634
This commit is contained in:
Erik Johnston
2026-05-27 11:15:33 +01:00
parent 2d866f945f
commit 1d7f67f91b
+3 -6
View File
@@ -19,10 +19,10 @@ from tests.unittest import HomeserverTestCase
class EventValidatorTestCase(HomeserverTestCase):
def test_validate_new_with_mentions_succeeds_even_when_frozen(self) -> None:
def test_validate_new_with_mentions_succeed(self) -> None:
"""
Test that `EventValidator.validate_new` accepts an event with valid `m.mentions`
content even when the event is frozen.
content.
"""
event = make_event_from_dict(
{
@@ -43,8 +43,5 @@ class EventValidatorTestCase(HomeserverTestCase):
},
room_version=RoomVersions.V9,
)
# Sanity check that the event is valid before freezing
EventValidator().validate_new(event, self.hs.config)
event.freeze()
# Event should still be valid after freezing
EventValidator().validate_new(event, self.hs.config)