mirror of
https://github.com/element-hq/synapse.git
synced 2026-06-03 19:11:21 +00:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user