mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 21:43:21 +00:00
@@ -479,6 +479,7 @@ exports.fixtures = {
|
||||
|
||||
restart: {
|
||||
type: "restart",
|
||||
server_generation: 2,
|
||||
immediate: true,
|
||||
},
|
||||
|
||||
|
||||
@@ -1085,6 +1085,11 @@ def check_realm_user_update(
|
||||
)
|
||||
|
||||
|
||||
restart_event = event_dict_type(
|
||||
required_keys=[("type", Equals("restart")), ("server_generation", int), ("immediate", bool)]
|
||||
)
|
||||
check_restart_event = make_checker(restart_event)
|
||||
|
||||
stream_create_event = event_dict_type(
|
||||
required_keys=[
|
||||
("type", Equals("stream")),
|
||||
|
||||
@@ -7,6 +7,7 @@ from django.conf import settings
|
||||
from django.http import HttpRequest, HttpResponse
|
||||
|
||||
from zerver.lib.actions import check_send_message, do_change_user_role, do_set_realm_property
|
||||
from zerver.lib.event_schema import check_restart_event
|
||||
from zerver.lib.events import fetch_initial_state_data, get_raw_user_data
|
||||
from zerver.lib.test_classes import ZulipTestCase
|
||||
from zerver.lib.test_helpers import HostRequestMock, queries_captured, stub_event_queue_user_events
|
||||
@@ -816,9 +817,7 @@ class RestartEventsTest(ZulipTestCase):
|
||||
self.assertEqual(len(virtual_events), 1)
|
||||
restart_event = virtual_events["restart"]
|
||||
|
||||
# TODO: add a schema checker for this to event_schema.py
|
||||
# and exercise it here (as well as the more concrete
|
||||
# check)
|
||||
check_restart_event("restart_event", restart_event)
|
||||
self.assertEqual(
|
||||
restart_event,
|
||||
dict(
|
||||
|
||||
Reference in New Issue
Block a user