:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
chore(tests): avoid database setup in HogQL utility tests (#116216)
Paul D'Ambraf1a4f860c20f
diff --git a/posthog/hogql/test/test_visitor.py b/posthog/hogql/test/test_visitor.pyindex 5f738c168bb2..6d48c1ec3364 100644--- a/posthog/hogql/test/test_visitor.py+++ b/posthog/hogql/test/test_visitor.py@@ -1,4 +1,4 @@-from posthog.test.base import BaseTest+from django.test import SimpleTestCasefrom parameterized import parameterized@@ -13,7 +13,7 @@ from posthog.hogql.parser import parse_exprfrom posthog.hogql.visitor import CloningVisitor, TraversingVisitor, Visitor-class TestVisitor(BaseTest):+class TestVisitor(SimpleTestCase):def test_visitor_pattern(self):class ConstantVisitor(CloningVisitor):def __init__(self):diff --git a/posthog/hogql/test/test_warehouse_warnings.py b/posthog/hogql/test/test_warehouse_warnings.pyindex c2c3584e076b..a6e0fb4b29bf 100644--- a/posthog/hogql/test/test_warehouse_warnings.py+++ b/posthog/hogql/test/test_warehouse_warnings.py@@ -1,4 +1,4 @@-from posthog.test.base import BaseTest+from django.test import SimpleTestCasefrom posthog.schema import DataWarehouseSyncWarning@@ -15,7 +15,7 @@ def _make_warning(table_name: str = "t", schema_name: str = "s") -> DataWarehous)-class TestWarehouseWarningsAccumulator(BaseTest):+class TestWarehouseWarningsAccumulator(SimpleTestCase):def test_record_warnings_is_a_noop_outside_a_scope(self) -> None:# Should not raise — no accumulator installed.record_warnings([_make_warning()])diff --git a/posthog/test/repo_invariants/database_free_test_classes_baseline.txt b/posthog/test/repo_invariants/database_free_test_classes_baseline.txtindex 9fe8867403b5..991604014119 100644--- a/posthog/test/repo_invariants/database_free_test_classes_baseline.txt+++ b/posthog/test/repo_invariants/database_free_test_classes_baseline.txt@@ -112,8 +112,6 @@ posthog/hogql/test/test_log_query_settings.py::TestTooManyBytesErrorposthog/hogql/test/test_parser_cache.py::TestParserCacheposthog/hogql/test/test_timings.py::TestHogQLTimingsposthog/hogql/test/test_utils.py::TestUtils-posthog/hogql/test/test_visitor.py::TestVisitor-posthog/hogql/test/test_warehouse_warnings.py::TestWarehouseWarningsAccumulatorposthog/hogql_queries/ai/test/test_utils.py::TestFilledPropertyFiltersposthog/hogql_queries/ai/test/test_utils.py::TestMergeHeavyPropertiesposthog/hogql_queries/endpoints/test/test_endpoints_usage_query_runners.py::TestSafeFloat