From 941f718b0887b74d92823e88ca349249d08bcec4 Mon Sep 17 00:00:00 2001 From: Steve Howell Date: Thu, 12 Oct 2017 08:13:02 -0700 Subject: [PATCH] Move tutorial code out of EventsRegisterTest.setUp. Now we only run this code for the single test that needs this setup. --- zerver/tests/test_events.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/zerver/tests/test_events.py b/zerver/tests/test_events.py index ca612dec16..f526b3f009 100644 --- a/zerver/tests/test_events.py +++ b/zerver/tests/test_events.py @@ -381,8 +381,6 @@ class EventsRegisterTest(ZulipTestCase): # type: () -> None super(EventsRegisterTest, self).setUp() self.user_profile = self.example_user('hamlet') - self.user_profile.tutorial_status = UserProfile.TUTORIAL_WAITING - self.user_profile.save(update_fields=['tutorial_status']) def create_bot(self, email): # type: (str) -> UserProfile @@ -1435,6 +1433,9 @@ class EventsRegisterTest(ZulipTestCase): def test_do_mark_hotspot_as_read(self): # type: () -> None + self.user_profile.tutorial_status = UserProfile.TUTORIAL_WAITING + self.user_profile.save(update_fields=['tutorial_status']) + schema_checker = self.check_events_dict([ ('type', equals('hotspots')), ('hotspots', check_list(check_dict_only([