Skip to content

Commit

Permalink
Fix execute_hogql_query espionage
Browse files Browse the repository at this point in the history
Wow, this was a pain to figure out, only was an issue in CI, because the trigger was `TestCohort::test_creating_update_and_calculating_with_new_cohort_query` running prior to `TestInsight:: test_insight_refreshing_query` – had to use trial and error.
  • Loading branch information
Twixes committed Apr 18, 2024
1 parent 8c40a44 commit 230975e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion posthog/api/test/test_insight.py
Original file line number Diff line number Diff line change
Expand Up @@ -1131,7 +1131,7 @@ def test_insight_refreshing_legacy(self, spy_update_insight_cache) -> None:
],
)

@patch("posthog.hogql.query.execute_hogql_query", wraps=execute_hogql_query)
@patch("posthog.hogql_queries.insights.trends.trends_query_runner.execute_hogql_query", wraps=execute_hogql_query)
def test_insight_refreshing_query(self, spy_execute_hogql_query) -> None:
dashboard_id, _ = self.dashboard_api.create_dashboard({"filters": {"date_from": "-14d"}})

Expand Down

0 comments on commit 230975e

Please sign in to comment.