From 1d7f67f91b2286dfc266e72135f9a9d30f08430d Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Wed, 27 May 2026 11:15:33 +0100 Subject: [PATCH] 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 --- tests/events/test_validator.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/tests/events/test_validator.py b/tests/events/test_validator.py index 3810fdb3da..082ae04a4c 100644 --- a/tests/events/test_validator.py +++ b/tests/events/test_validator.py @@ -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)