Files
awesome-reviewers/_reviewers/posthog-test-edge-cases-comprehensively.json
2025-08-19 12:19:58 +00:00

46 lines
4.5 KiB
JSON

[
{
"discussion_id": "2283829963",
"pr_number": 36692,
"pr_file": "posthog/warehouse/api/test/test_data_warehouse.py",
"created_at": "2025-08-19T01:29:38+00:00",
"commented_code": "self.assertEqual(response.status_code, 500)\n self.assertEqual(data[\"error\"], \"An error occurred retrieving billing information\")\n+\n+ def test_recent_activity_includes_external_jobs_and_modeling_jobs(self):",
"repo_full_name": "PostHog/posthog",
"discussion_comments": [
{
"comment_id": "2283829963",
"repo_full_name": "PostHog/posthog",
"pr_number": 36692,
"pr_file": "posthog/warehouse/api/test/test_data_warehouse.py",
"discussion_id": "2283829963",
"commented_code": "@@ -57,3 +58,57 @@ def test_billing_exception_returns_500(self, mock_license, mock_billing_manager)\n \n self.assertEqual(response.status_code, 500)\n self.assertEqual(data[\"error\"], \"An error occurred retrieving billing information\")\n+\n+ def test_recent_activity_includes_external_jobs_and_modeling_jobs(self):",
"comment_created_at": "2025-08-19T01:29:38+00:00",
"comment_author": "EDsCODE",
"comment_body": "NIT: would be good to test some empty states (if either model is empty) and make sure pagination works (effectively validating the query logic is right)",
"pr_file_module": null
}
]
},
{
"discussion_id": "2241909890",
"pr_number": 35834,
"pr_file": "posthog/models/web_preaggregated/test_web_pre_aggregated_timezones.py",
"created_at": "2025-07-30T08:27:09+00:00",
"commented_code": "+from posthog.models import Team\n+from parameterized import parameterized\n+\n+from posthog.clickhouse.client.execute import sync_execute\n+from posthog.models.web_preaggregated.sql import (\n+ WEB_STATS_INSERT_SQL,\n+ WEB_BOUNCES_INSERT_SQL,\n+ WEB_STATS_DAILY_SQL,\n+ WEB_STATS_HOURLY_SQL,\n+ WEB_BOUNCES_DAILY_SQL,\n+ WEB_BOUNCES_HOURLY_SQL,\n+)\n+from posthog.models.utils import uuid7\n+from posthog.hogql_queries.web_analytics.test.web_preaggregated_test_base import WebAnalyticsPreAggregatedTestBase\n+from posthog.test.base import (\n+ _create_event,\n+ _create_person,\n+ flush_persons_and_events,\n+ snapshot_clickhouse_queries,\n+)\n+from posthog.hogql_queries.web_analytics.stats_table import WebStatsTableQueryRunner\n+from posthog.hogql_queries.web_analytics.test.test_web_stats_table import FloatAwareTestCase\n+from posthog.schema import (\n+ DateRange,\n+ WebStatsTableQuery,\n+ WebStatsBreakdown,\n+ HogQLQueryModifiers,\n+)\n+\n+\n+@snapshot_clickhouse_queries\n+class TestTimezonePreAggregatedIntegration(WebAnalyticsPreAggregatedTestBase, FloatAwareTestCase):",
"repo_full_name": "PostHog/posthog",
"discussion_comments": [
{
"comment_id": "2241909890",
"repo_full_name": "PostHog/posthog",
"pr_number": 35834,
"pr_file": "posthog/models/web_preaggregated/test_web_pre_aggregated_timezones.py",
"discussion_id": "2241909890",
"commented_code": "@@ -0,0 +1,342 @@\n+from posthog.models import Team\n+from parameterized import parameterized\n+\n+from posthog.clickhouse.client.execute import sync_execute\n+from posthog.models.web_preaggregated.sql import (\n+ WEB_STATS_INSERT_SQL,\n+ WEB_BOUNCES_INSERT_SQL,\n+ WEB_STATS_DAILY_SQL,\n+ WEB_STATS_HOURLY_SQL,\n+ WEB_BOUNCES_DAILY_SQL,\n+ WEB_BOUNCES_HOURLY_SQL,\n+)\n+from posthog.models.utils import uuid7\n+from posthog.hogql_queries.web_analytics.test.web_preaggregated_test_base import WebAnalyticsPreAggregatedTestBase\n+from posthog.test.base import (\n+ _create_event,\n+ _create_person,\n+ flush_persons_and_events,\n+ snapshot_clickhouse_queries,\n+)\n+from posthog.hogql_queries.web_analytics.stats_table import WebStatsTableQueryRunner\n+from posthog.hogql_queries.web_analytics.test.test_web_stats_table import FloatAwareTestCase\n+from posthog.schema import (\n+ DateRange,\n+ WebStatsTableQuery,\n+ WebStatsBreakdown,\n+ HogQLQueryModifiers,\n+)\n+\n+\n+@snapshot_clickhouse_queries\n+class TestTimezonePreAggregatedIntegration(WebAnalyticsPreAggregatedTestBase, FloatAwareTestCase):",
"comment_created_at": "2025-07-30T08:27:09+00:00",
"comment_author": "robbie-c",
"comment_body": "It'd be good to have a test to see what happens if someone tries to query with a team timezone of e.g. India +5:30, even if it's to assert that something throws an error. ",
"pr_file_module": null
}
]
}
]