def test_num_queries_for_realm_admin(self) -> None:
    self.login(self.example_email('iago'))
    flush_per_request_caches()
    with queries_captured() as queries:
        with patch('zerver.lib.cache.cache_set') as cache_mock:
            result = self._get_home_page()
            self.assertEqual(result.status_code, 200)
            self.assert_length(cache_mock.call_args_list, 6)
        self.assert_length(queries, 37)
def test_num_queries_for_realm_admin(self) -> None:
    self.login(self.example_email('iago'))
    flush_per_request_caches()
    with queries_captured() as queries:
        with patch('zerver.lib.cache.cache_set') as cache_mock:
            result = self._get_home_page()
            self.assertEqual(result.status_code, 200)
            self.assert_length(cache_mock.call_args_list, 6)
        self.assert_length(queries, 37)