diff --git a/posthog/test/test_middleware.py b/posthog/test/test_middleware.py index 2d987bc2795e1..a66d26b8332bf 100644 --- a/posthog/test/test_middleware.py +++ b/posthog/test/test_middleware.py @@ -164,7 +164,7 @@ def setUp(self): def test_project_switched_when_accessing_dashboard_of_another_accessible_team(self): dashboard = Dashboard.objects.create(team=self.second_team) - with self.assertNumQueries(self.base_app_num_queries + 7): # AutoProjectMiddleware adds 4 queries + with self.assertNumQueries(self.base_app_num_queries + 6): # AutoProjectMiddleware adds 4 queries response_app = self.client.get(f"/dashboard/{dashboard.id}") response_users_api = self.client.get(f"/api/users/@me/") response_users_api_data = response_users_api.json() @@ -282,7 +282,7 @@ def test_project_switched_when_accessing_cohort_of_another_accessible_team(self) def test_project_switched_when_accessing_feature_flag_of_another_accessible_team(self): feature_flag = FeatureFlag.objects.create(team=self.second_team, created_by=self.user) - with self.assertNumQueries(self.base_app_num_queries + 7): + with self.assertNumQueries(self.base_app_num_queries + 6): response_app = self.client.get(f"/feature_flags/{feature_flag.id}") response_users_api = self.client.get(f"/api/users/@me/") response_users_api_data = response_users_api.json()