mirror of https://github.com/zulip/zulip.git
tests: Fix comment about number of database queries.
This commit fixes the comment about number of database queries when moving message from muted topic to mention clearly about the number of queries added due to original topic being muted. We do not include the queries that is executed to check whether the topic is muted or not, as they will be executed in all cases.
This commit is contained in:
parent
f9eff1c478
commit
6e4c844907
|
@ -1354,8 +1354,11 @@ class EditMessageTest(EditMessageTestCase):
|
||||||
users_to_be_notified_via_muted_topics_event.append(user_topic.user_profile_id)
|
users_to_be_notified_via_muted_topics_event.append(user_topic.user_profile_id)
|
||||||
|
|
||||||
change_all_topic_name = "Topic 1 edited"
|
change_all_topic_name = "Topic 1 edited"
|
||||||
# This code path adds 19 (12 + 4/visibility_policy + 1/user + 1) to
|
# Verify how many total database queries are required. We
|
||||||
# the number of database queries for moving a topic.
|
# expect 6 queries (4/visibility_policy to update the muted
|
||||||
|
# state + 1/user with a UserTopic row for the events data)
|
||||||
|
# beyond what is typical were there not UserTopic records to
|
||||||
|
# update. Ideally, we'd eliminate the per-user component.
|
||||||
with self.assert_database_query_count(19):
|
with self.assert_database_query_count(19):
|
||||||
check_update_message(
|
check_update_message(
|
||||||
user_profile=hamlet,
|
user_profile=hamlet,
|
||||||
|
|
Loading…
Reference in New Issue