mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 22:43:42 +00:00
tests: Add a mocked session object for tornado tests.
(imported from commit 0431d4cbb2233b7136367ad33f04ed2cc219add2)
This commit is contained in:
@@ -400,6 +400,9 @@ class DummyHandler(object):
|
||||
def finish(self, _):
|
||||
return
|
||||
|
||||
class DummySession(object):
|
||||
session_key = "0"
|
||||
|
||||
class POSTRequestMock(object):
|
||||
method = "POST"
|
||||
|
||||
@@ -407,6 +410,7 @@ class POSTRequestMock(object):
|
||||
self.POST = post_data
|
||||
self.user = user
|
||||
self._tornado_handler = DummyHandler(assert_callback)
|
||||
self.session = DummySession()
|
||||
|
||||
class GetUpdatesTest(AuthedTestCase):
|
||||
fixtures = ['messages.json']
|
||||
|
||||
Reference in New Issue
Block a user