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.

test_counts: Add test to do_incremental_logging_stat.

Mahhheshh218c7ae8cd38
diff --git a/analytics/tests/test_counts.py b/analytics/tests/test_counts.py
index 14e7b98cef7..edfb0234f3b 100644
--- a/analytics/tests/test_counts.py
+++ b/analytics/tests/test_counts.py
@@ -1324,6 +1324,11 @@ class TestDoIncrementLoggingStat(AnalyticsTestCase):
do_increment_logging_stat(self.default_realm, stat, None, self.TIME_ZERO)
self.assertTableState(RealmCount, ["value"], [[3]])
+ def test_do_increment_logging_start_query_count(self) -> None:
+ stat = LoggingCountStat("test", RealmCount, CountStat.DAY)
+ with self.assert_database_query_count(2):
+ do_increment_logging_stat(self.default_realm, stat, None, self.TIME_ZERO)
+
class TestLoggingCountStats(AnalyticsTestCase):
def test_aggregation(self) -> None: