Skip to content

Commit

Permalink
Fix some tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Twixes committed Dec 20, 2024
1 parent d2a18d2 commit d249aee
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions ee/billing/test/test_quota_limiting.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def test_quota_limiting_feature_flag_enabled(self, patch_feature_enabled, patch_
org_id,
"quota limiting suspended",
properties={"current_usage": 109},
groups={"instance": "http://localhost:8000", "organization": org_id},
groups={"instance": "http://localhost:8010", "organization": org_id},
)
# Feature flag is enabled so they won't be limited.
assert quota_limited_orgs["events"] == {}
Expand Down Expand Up @@ -222,7 +222,7 @@ def test_billing_rate_limit(self, patch_capture) -> None:
"quota_limited_recordings": 1612137599,
"quota_limited_rows_synced": None,
},
groups={"instance": "http://localhost:8000", "organization": org_id},
groups={"instance": "http://localhost:8010", "organization": org_id},
)

assert self.redis_client.zrange(f"@posthog/quota-limits/events", 0, -1) == [
Expand Down
10 changes: 5 additions & 5 deletions ee/tasks/test/subscriptions/test_slack_subscriptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,12 @@ def test_subscription_delivery(self, MockSlackIntegration: MagicMock) -> None:
{
"type": "button",
"text": {"type": "plain_text", "text": "View in PostHog"},
"url": "http://localhost:8000/insights/123456?utm_source=posthog&utm_campaign=subscription_report&utm_medium=slack",
"url": "http://localhost:8010/insights/123456?utm_source=posthog&utm_campaign=subscription_report&utm_medium=slack",
},
{
"type": "button",
"text": {"type": "plain_text", "text": "Manage Subscription"},
"url": f"http://localhost:8000/insights/123456/subscriptions/{self.subscription.id}?utm_source=posthog&utm_campaign=subscription_report&utm_medium=slack",
"url": f"http://localhost:8010/insights/123456/subscriptions/{self.subscription.id}?utm_source=posthog&utm_campaign=subscription_report&utm_medium=slack",
},
],
},
Expand Down Expand Up @@ -141,12 +141,12 @@ def test_subscription_dashboard_delivery(self, MockSlackIntegration: MagicMock)
{
"type": "button",
"text": {"type": "plain_text", "text": "View in PostHog"},
"url": f"http://localhost:8000/dashboard/{self.dashboard.id}?utm_source=posthog&utm_campaign=subscription_report&utm_medium=slack",
"url": f"http://localhost:8010/dashboard/{self.dashboard.id}?utm_source=posthog&utm_campaign=subscription_report&utm_medium=slack",
},
{
"type": "button",
"text": {"type": "plain_text", "text": "Manage Subscription"},
"url": f"http://localhost:8000/dashboard/{self.dashboard.id}/subscriptions/{self.subscription.id}?utm_source=posthog&utm_campaign=subscription_report&utm_medium=slack",
"url": f"http://localhost:8010/dashboard/{self.dashboard.id}/subscriptions/{self.subscription.id}?utm_source=posthog&utm_campaign=subscription_report&utm_medium=slack",
},
],
},
Expand Down Expand Up @@ -181,7 +181,7 @@ def test_subscription_dashboard_delivery(self, MockSlackIntegration: MagicMock)
"type": "section",
"text": {
"type": "mrkdwn",
"text": f"Showing 3 of 10 Insights. <http://localhost:8000/dashboard/{self.dashboard.id}?utm_source=posthog&utm_campaign=subscription_report&utm_medium=slack|View the rest in PostHog>",
"text": f"Showing 3 of 10 Insights. <http://localhost:8010/dashboard/{self.dashboard.id}?utm_source=posthog&utm_campaign=subscription_report&utm_medium=slack|View the rest in PostHog>",
},
}
]
Expand Down
4 changes: 2 additions & 2 deletions posthog/models/test/test_user_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def test_analytics_metadata(self):
"has_social_auth": False,
"social_providers": [],
"strapi_id": None,
"instance_url": "http://localhost:8000",
"instance_url": "http://localhost:8010",
"instance_tag": "none",
"is_email_verified": None,
"has_seen_product_intro_for": None,
Expand Down Expand Up @@ -76,7 +76,7 @@ def test_analytics_metadata(self):
"has_social_auth": False,
"social_providers": [],
"strapi_id": None,
"instance_url": "http://localhost:8000",
"instance_url": "http://localhost:8010",
"instance_tag": "none",
"is_email_verified": None,
"has_seen_product_intro_for": None,
Expand Down
4 changes: 2 additions & 2 deletions posthog/tasks/test/test_periodic_digest.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def test_periodic_digest_report(self, mock_capture: MagicMock) -> None:
"plugins_installed": {},
"product": "open source",
"realm": "hosted-clickhouse",
"site_url": "http://localhost:8000",
"site_url": "http://localhost:8010",
"table_sizes": ANY,
"clickhouse_version": ANY,
"deployment_infrastructure": "unknown",
Expand Down Expand Up @@ -240,7 +240,7 @@ def test_periodic_digest_report_custom_dates(self, mock_capture: MagicMock) -> N
"plugins_installed": {},
"product": "open source",
"realm": "hosted-clickhouse",
"site_url": "http://localhost:8000",
"site_url": "http://localhost:8010",
"table_sizes": ANY,
"clickhouse_version": ANY,
"deployment_infrastructure": "unknown",
Expand Down
2 changes: 1 addition & 1 deletion posthog/tasks/test/test_plugin_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def test_tracks_events_regardless(self, mock_report_action: MagicMock, MockEmail
"hog function state changed",
{
"hog_function_id": str(hog_function.id),
"hog_function_url": f"http://localhost:8000/project/{hog_function.team.id}/pipeline/destinations/hog-{str(hog_function.id)}",
"hog_function_url": f"http://localhost:8010/project/{hog_function.team.id}/pipeline/destinations/hog-{str(hog_function.id)}",
"state": 1,
},
)
Expand Down
6 changes: 3 additions & 3 deletions posthog/tasks/test/test_usage_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -1591,7 +1591,7 @@ def test_send_usage_cloud(self, mock_post: MagicMock, mock_client: MagicMock) ->
"organization usage report",
{**full_report_as_dict, "scope": "user"},
groups={
"instance": "http://localhost:8000",
"instance": "http://localhost:8010",
"organization": str(self.organization.id),
},
timestamp=None,
Expand Down Expand Up @@ -1703,7 +1703,7 @@ def test_capture_report_transforms_team_id_to_org_id(self, mock_client: MagicMoc
self.user.distinct_id,
"test event",
{**report, "scope": "user"},
groups={"instance": "http://localhost:8000", "organization": str(self.organization.id)},
groups={"instance": "http://localhost:8010", "organization": str(self.organization.id)},
timestamp=None,
)

Expand All @@ -1722,7 +1722,7 @@ def test_capture_report_transforms_team_id_to_org_id(self, mock_client: MagicMoc
self.user.distinct_id,
"test event",
{**report, "scope": "user"},
groups={"instance": "http://localhost:8000", "organization": str(self.organization.id)},
groups={"instance": "http://localhost:8010", "organization": str(self.organization.id)},
timestamp=None,
)

Expand Down

0 comments on commit d249aee

Please sign in to comment.