Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

custom fields: Add query count regression test for updates.

Ahmed Tabish779e1ee1a317
diff --git a/zerver/tests/test_custom_profile_data.py b/zerver/tests/test_custom_profile_data.py
index f400599b211..d9aa7fd92d1 100644
--- a/zerver/tests/test_custom_profile_data.py
+++ b/zerver/tests/test_custom_profile_data.py
@@ -923,10 +923,15 @@ class UpdateCustomProfileFieldTest(CustomProfileFieldTestCase):
)
# Update value of field
- result = self.client_patch(
- "/json/users/me/profile_data",
- {"data": orjson.dumps([{"id": f["id"], "value": f["value"]} for f in data]).decode()},
- )
+ with self.assert_database_query_count(36):
+ result = self.client_patch(
+ "/json/users/me/profile_data",
+ {
+ "data": orjson.dumps(
+ [{"id": f["id"], "value": f["value"]} for f in data]
+ ).decode()
+ },
+ )
self.assert_json_success(result)
iago = self.example_user("iago")