mirror of
https://github.com/zulip/zulip.git
synced 2026-07-15 21:03:26 +08:00
testing: Avoid class variables to enforce isolation.
Class variables are shared between all instances and as a result changes made by one instance are leaked to other instances.
This commit is contained in:
parent
169f1e35b8
commit
ebb9bd1a6a
@ -340,8 +340,10 @@ class GetEventsTest(ZulipTestCase):
|
||||
self.assertEqual(events[0]["message"]["display_recipient"], "Denmark")
|
||||
|
||||
class EventsRegisterTest(ZulipTestCase):
|
||||
user_profile = get_user_profile_by_email('hamlet@zulip.com')
|
||||
maxDiff = None # type: Optional[int]
|
||||
def setUp(self):
|
||||
super(EventsRegisterTest, self).setUp()
|
||||
self.user_profile = self.example_user('hamlet')
|
||||
self.maxDiff = None # type: Optional[int]
|
||||
|
||||
def create_bot(self, email):
|
||||
# type: (str) -> UserProfile
|
||||
|
||||
Loading…
Reference in New Issue
Block a user