diff --git a/corporate/tests/test_support_views.py b/corporate/tests/test_support_views.py index 906adba5b9..373a20a3c0 100644 --- a/corporate/tests/test_support_views.py +++ b/corporate/tests/test_support_views.py @@ -170,6 +170,13 @@ class TestRemoteServerSupportEndpoint(ZulipTestCase): remote_server=remote_realm.server, email="server-admin@example.com" ) + def test_remote_support_view_queries(self) -> None: + iago = self.example_user("iago") + self.login_user(iago) + with self.assert_database_query_count(28): + result = self.client_get("/activity/remote/support", {"q": "zulip-3.example.com"}) + self.assertEqual(result.status_code, 200) + def test_search(self) -> None: def assert_server_details_in_response( html_response: "TestHttpResponse", hostname: str @@ -737,6 +744,13 @@ class TestSupportEndpoint(ZulipTestCase): ) return customer + def test_realm_support_view_queries(self) -> None: + iago = self.example_user("iago") + self.login_user(iago) + with self.assert_database_query_count(16): + result = self.client_get("/activity/support", {"q": "zulip"}, subdomain="zulip") + self.assertEqual(result.status_code, 200) + def test_search(self) -> None: reset_email_visibility_to_everyone_in_zulip_realm() lear_user = self.lear_user("king")