mirror of https://github.com/zulip/zulip.git
tests: Reserve "Internal" client, used by email gateway and topic moves.
(cherry picked from commit 13b9c87f93
)
This commit is contained in:
parent
aee36b2b49
commit
fd1db72276
|
@ -53,6 +53,7 @@ def create_internal_realm() -> None:
|
|||
# just ensures these get low IDs in production, and in development
|
||||
# avoids an extra database write for the first HTTP request in
|
||||
# most tests.
|
||||
get_client("Internal")
|
||||
get_client("website")
|
||||
get_client("ZulipMobile")
|
||||
get_client("ZulipElectron")
|
||||
|
|
|
@ -1027,7 +1027,7 @@ class TestMissedMessageEmailMessages(ZulipTestCase):
|
|||
incoming_valid_message["To"] = mm_address
|
||||
incoming_valid_message["Reply-to"] = self.example_email("othello")
|
||||
|
||||
with self.assert_database_query_count(17):
|
||||
with self.assert_database_query_count(16):
|
||||
process_message(incoming_valid_message)
|
||||
|
||||
# confirm that Hamlet got the message
|
||||
|
@ -1072,7 +1072,7 @@ class TestMissedMessageEmailMessages(ZulipTestCase):
|
|||
incoming_valid_message["To"] = mm_address
|
||||
incoming_valid_message["Reply-to"] = self.example_email("cordelia")
|
||||
|
||||
with self.assert_database_query_count(22):
|
||||
with self.assert_database_query_count(21):
|
||||
process_message(incoming_valid_message)
|
||||
|
||||
# Confirm Iago received the message.
|
||||
|
@ -1124,7 +1124,7 @@ class TestMissedMessageEmailMessages(ZulipTestCase):
|
|||
incoming_valid_message["To"] = mm_address
|
||||
incoming_valid_message["Reply-to"] = user_profile.delivery_email
|
||||
|
||||
with self.assert_database_query_count(18):
|
||||
with self.assert_database_query_count(17):
|
||||
process_message(incoming_valid_message)
|
||||
|
||||
# confirm that Hamlet got the message
|
||||
|
|
|
@ -3785,7 +3785,7 @@ class EditMessageTest(EditMessageTestCase):
|
|||
"iago", "test move stream", "new stream", "test"
|
||||
)
|
||||
|
||||
with self.assert_database_query_count(56), self.assert_memcached_count(14):
|
||||
with self.assert_database_query_count(55), self.assert_memcached_count(14):
|
||||
result = self.client_patch(
|
||||
f"/json/messages/{msg_id}",
|
||||
{
|
||||
|
|
|
@ -931,7 +931,7 @@ class LoginTest(ZulipTestCase):
|
|||
# seem to be any O(N) behavior. Some of the cache hits are related
|
||||
# to sending messages, such as getting the welcome bot, looking up
|
||||
# the alert words for a realm, etc.
|
||||
with self.assert_database_query_count(105), self.assert_memcached_count(18):
|
||||
with self.assert_database_query_count(104), self.assert_memcached_count(18):
|
||||
with self.captureOnCommitCallbacks(execute=True):
|
||||
self.register(self.nonreg_email("test"), "test")
|
||||
|
||||
|
|
|
@ -4597,7 +4597,7 @@ class SubscriptionAPITest(ZulipTestCase):
|
|||
realm = get_realm("zulip")
|
||||
streams_to_sub = ["multi_user_stream"]
|
||||
with self.capture_send_event_calls(expected_num_events=5) as events:
|
||||
with self.assert_database_query_count(37):
|
||||
with self.assert_database_query_count(36):
|
||||
self.common_subscribe_to_streams(
|
||||
self.test_user,
|
||||
streams_to_sub,
|
||||
|
@ -5522,7 +5522,7 @@ class SubscriptionAPITest(ZulipTestCase):
|
|||
]
|
||||
|
||||
# Test creating a public stream when realm does not have a notification stream.
|
||||
with self.assert_database_query_count(37):
|
||||
with self.assert_database_query_count(36):
|
||||
self.common_subscribe_to_streams(
|
||||
self.test_user,
|
||||
[new_streams[0]],
|
||||
|
@ -6011,7 +6011,7 @@ class GetSubscribersTest(ZulipTestCase):
|
|||
polonius.id,
|
||||
]
|
||||
|
||||
with self.assert_database_query_count(47):
|
||||
with self.assert_database_query_count(46):
|
||||
self.common_subscribe_to_streams(
|
||||
self.user_profile,
|
||||
streams,
|
||||
|
|
|
@ -867,7 +867,7 @@ class QueryCountTest(ZulipTestCase):
|
|||
|
||||
prereg_user = PreregistrationUser.objects.get(email="fred@zulip.com")
|
||||
|
||||
with self.assert_database_query_count(94):
|
||||
with self.assert_database_query_count(93):
|
||||
with self.assert_memcached_count(23):
|
||||
with self.capture_send_event_calls(expected_num_events=11) as events:
|
||||
fred = do_create_user(
|
||||
|
|
Loading…
Reference in New Issue