test_events: Eliminate hard-coded user id.

This commit is contained in:
Mateusz Mandera
2019-08-19 04:16:32 +02:00
committed by Tim Abbott
parent afc9650ebb
commit 0edc7d74ff

View File

@@ -2360,7 +2360,8 @@ class EventsRegisterTest(ZulipTestCase):
stream = self.make_stream('old_name')
new_name = u'stream with a brand new name'
self.subscribe(self.user_profile, stream.name)
notification = '<p><span class="user-mention silent" data-user-id="4">King Hamlet</span> renamed stream <strong>old_name</strong> to <strong>stream with a brand new name</strong>.</p>'
notification = '<p><span class="user-mention silent" data-user-id="{user_id}">King Hamlet</span> renamed stream <strong>old_name</strong> to <strong>stream with a brand new name</strong>.</p>'
notification = notification.format(user_id=self.user_profile.id)
action = lambda: do_rename_stream(stream, new_name, self.user_profile)
events = self.do_test(action, num_events=3)
schema_checker = self.check_events_dict([