22from datetime import date , timedelta
33
44import pytest
5+ from api .integrations .launch_darkly .types import Project
56from django .urls import reverse
67from django .utils import timezone
78from pytest_django .fixtures import SettingsWrapper
1819from app_analytics .models import FeatureEvaluationRaw
1920from environments .identities .models import Identity
2021from environments .models import Environment
21- from api .integrations .launch_darkly .types import Project
2222from features .models import Feature
2323from organisations .models import (
2424 Organisation ,
2525 OrganisationSubscriptionInformationCache ,
2626)
2727from tests .types import EnableFeaturesFixture
2828
29+
2930@pytest .fixture ()
3031def feature_with_dots (project : Project ) -> Feature :
3132 return Feature .objects .create (name = "feature.with.dots" , project = project ) # type: ignore[no-any-return]
3233
34+
3335def test_sdk_analytics_ignores_bad_data (
3436 mocker : MockerFixture ,
3537 environment : Environment ,
@@ -62,6 +64,7 @@ def test_sdk_analytics_ignores_bad_data(
6264 labels = {},
6365 )
6466
67+
6568def test_sdk_analytics_ignores_feature_data_with_dots (
6669 mocker : MockerFixture ,
6770 environment : Environment ,
@@ -71,7 +74,7 @@ def test_sdk_analytics_ignores_feature_data_with_dots(
7174 # Given
7275 api_client .credentials (HTTP_X_ENVIRONMENT_KEY = environment .api_key )
7376
74- data = { feature_with_dots .name : 20 }
77+ data = {feature_with_dots .name : 20 }
7578 mocked_feature_eval_cache = mocker .patch (
7679 "app_analytics.views.feature_evaluation_cache"
7780 )
0 commit comments