: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
perf(test-tiering): split pure Salesforce enrichment tests from BaseTest (#102848)
Paul D'Ambra90f1ee03b620
diff --git a/ee/billing/test/test_salesforce_enrichment.py b/ee/billing/test/test_salesforce_enrichment.pyindex c49edf781f57..87c3a22442ba 100644--- a/ee/billing/test/test_salesforce_enrichment.py+++ b/ee/billing/test/test_salesforce_enrichment.py@@ -5,9 +5,10 @@ from pathlib import Pathimport pytestimport time_machine-from posthog.test.base import BaseTestfrom unittest.mock import AsyncMock, patch+from django.test import SimpleTestCase+from parameterized import parameterizedfrom ee.billing.salesforce_enrichment.enrichment import (@@ -42,7 +43,7 @@ def load_harmonic_fixture():return data["response"]-class TestDomainExclusion(BaseTest):+class TestDomainExclusion(SimpleTestCase):@parameterized.expand([# None and empty values@@ -84,7 +85,7 @@ class TestDomainExclusion(BaseTest):assert result is expected, f"Failed for: {description}"-class TestExtractDomain(BaseTest):+class TestExtractDomain(SimpleTestCase):"""Unit tests for _extract_domain helper function."""@parameterized.expand(@@ -114,7 +115,7 @@ class TestExtractDomain(BaseTest):assert result == expected, f"Failed for: {description}"-class TestYCCompanyDetection(BaseTest):+class TestYCCompanyDetection(SimpleTestCase):"""Unit tests for Y Combinator company detection."""@parameterized.expand(@@ -144,7 +145,7 @@ class TestYCCompanyDetection(BaseTest):assert result == expected, f"Failed for: {description}"-class TestHarmonicDataTransformation(BaseTest):+class TestHarmonicDataTransformation(SimpleTestCase):@time_machine.travel("2025-07-29T12:00:00Z", tick=False)def test_transform_harmonic_data_with_fixture(self):"""Test transform_harmonic_data output structure and field mapping with real fixture."""@@ -544,7 +545,7 @@ class TestHarmonicDataTransformation(BaseTest):assert salesforce_data["harmonic_is_yc_company__c"] is False-class TestSalesforceAccountQuery(BaseTest):+class TestSalesforceAccountQuery(SimpleTestCase):def test_get_salesforce_accounts_by_domain_escapes_quotes(self):"""Test that single quotes in domain are properly escaped to prevent SOQL injection."""malicious_domain = "test'OR'1'='1"@@ -629,7 +630,7 @@ class TestSalesforceAccountQuery(BaseTest):assert "LIKE '%example.com%'" not in actual_query-class TestSpecificDomainEnrichment(BaseTest):+class TestSpecificDomainEnrichment(SimpleTestCase):@pytest.mark.asyncio@time_machine.travel("2025-07-29T12:00:00Z", tick=False)async def test_specific_domain_enrichment_success(self):@@ -895,7 +896,7 @@ class TestSpecificDomainEnrichment(BaseTest):assert mock_sf.query_all.called-class TestValuesMatch(BaseTest):+class TestValuesMatch(SimpleTestCase):@parameterized.expand([("2025-07-29T12:00:00Z", "2025-07-29T12:00:00.000+0000", True, "ISO Z to Salesforce format"),diff --git a/posthog/test/repo_invariants/database_free_test_classes_baseline.txt b/posthog/test/repo_invariants/database_free_test_classes_baseline.txtindex 56e83a6bee3f..019dbfc8adc8 100644--- a/posthog/test/repo_invariants/database_free_test_classes_baseline.txt+++ b/posthog/test/repo_invariants/database_free_test_classes_baseline.txt@@ -11,13 +11,6 @@ ee/api/vercel/test/test_vercel_connect.py::TestValidateNextUrlee/billing/test/test_billing_consumer.py::TestBillingConsumerUsageSpikeee/billing/test/test_billing_manager.py::TestParamSerializationee/billing/test/test_quota_limiting.py::TestIdentifyRefreshCandidates-ee/billing/test/test_salesforce_enrichment.py::TestDomainExclusion-ee/billing/test/test_salesforce_enrichment.py::TestExtractDomain-ee/billing/test/test_salesforce_enrichment.py::TestHarmonicDataTransformation-ee/billing/test/test_salesforce_enrichment.py::TestSalesforceAccountQuery-ee/billing/test/test_salesforce_enrichment.py::TestSpecificDomainEnrichment-ee/billing/test/test_salesforce_enrichment.py::TestValuesMatch-ee/billing/test/test_salesforce_enrichment.py::TestYCCompanyDetectionee/billing/test/test_usage_signals.py::TestFetchUsageSignalsFromGroupsee/billing/test/test_usage_signals.py::TestUsageSignalsDataClassee/clickhouse/materialized_columns/test/test_analyze.py::TestMaterializedColumnsAnalyze