From 14eeaa6bcb1c22263eb77b6b5dde856e1832ca59 Mon Sep 17 00:00:00 2001 From: Gagan Trivedi Date: Mon, 3 Jun 2024 11:57:34 +0530 Subject: [PATCH] fixup! fix(sentry-FLAGSMITH-API-4FY): resolve metadata segment n+1 --- api/tests/unit/segments/test_unit_segments_views.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/api/tests/unit/segments/test_unit_segments_views.py b/api/tests/unit/segments/test_unit_segments_views.py index 41da3c5f7fc8..a41309a49f20 100644 --- a/api/tests/unit/segments/test_unit_segments_views.py +++ b/api/tests/unit/segments/test_unit_segments_views.py @@ -6,6 +6,7 @@ from django.contrib.contenttypes.models import ContentType from django.urls import reverse from flag_engine.segments.constants import EQUAL +from pytest_django import DjangoAssertNumQueries from pytest_django.fixtures import SettingsWrapper from pytest_lazyfixture import lazy_fixture from rest_framework import status @@ -343,11 +344,11 @@ def test_get_segment_by_uuid(client, project, segment): ], ) def test_list_segments( - django_assert_num_queries, - project, - client, - num_queries, - required_a_segment_metadata_field, + django_assert_num_queries: DjangoAssertNumQueries, + project: Project, + client: APIClient, + num_queries: int, + required_a_segment_metadata_field: MetadataModelField, ): # Given num_segments = 5