Move tutorial code out of EventsRegisterTest.setUp.

Now we only run this code for the single test that needs
this setup.
This commit is contained in:
Steve Howell 2017-10-12 08:13:02 -07:00 committed by Tim Abbott
parent 6a5cb0e48c
commit 941f718b08
1 changed files with 3 additions and 2 deletions

View File

@ -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([