diff --git a/tests/sentry/issues/test_ingest.py b/tests/sentry/issues/test_ingest.py index cb12627d233684..e0c7a994924bdf 100644 --- a/tests/sentry/issues/test_ingest.py +++ b/tests/sentry/issues/test_ingest.py @@ -119,7 +119,7 @@ def test_new_group_release_env(self) -> None: def test_different_ids(self) -> None: create_default_projects() - event_data = load_data("generic-event-profiling").data + event_data = load_data("generic-event-profiling") project_id = event_data["event"].pop("project_id", self.project.id) event_data["event"]["timestamp"] = timezone.now().isoformat() event = self.store_event(data=event_data["event"], project_id=project_id) @@ -444,7 +444,7 @@ def test_populates_feedback_metadata(self) -> None: class SaveIssueOccurrenceToEventstreamTest(OccurrenceTestMixin, TestCase): def test(self) -> None: create_default_projects() - event_data = load_data("generic-event-profiling").data + event_data = load_data("generic-event-profiling") project_id = event_data["event"].pop("project_id") event_data["event"]["timestamp"] = timezone.now().isoformat() event = self.store_event(data=event_data["event"], project_id=project_id) diff --git a/tests/sentry/models/test_processingissue.py b/tests/sentry/models/test_processingissue.py index 632a17a23ce967..d44b86149e9608 100644 --- a/tests/sentry/models/test_processingissue.py +++ b/tests/sentry/models/test_processingissue.py @@ -9,7 +9,6 @@ ) from sentry.models.rawevent import RawEvent from sentry.testutils.cases import TestCase -from sentry.utils.canonical import CanonicalKeyDict class ProcessingIssueTest(TestCase): @@ -76,7 +75,7 @@ def test_with_release_dist_pair_and_no_previous_issue(self): raw_event = RawEvent.objects.create( project_id=project.id, event_id="abc", - data=CanonicalKeyDict({"release": release.version, "dist": dist.name}), + data={"release": release.version, "dist": dist.name}, ) manager = ProcessingIssueManager() @@ -112,7 +111,7 @@ def test_with_release_dist_pair_and_previous_issue_without_release_dist(self): raw_event = RawEvent.objects.create( project_id=project.id, event_id="abc", - data=CanonicalKeyDict({"release": release.version, "dist": dist.name}), + data={"release": release.version, "dist": dist.name}, ) ProcessingIssue.objects.create( @@ -167,7 +166,7 @@ def test_with_release_dist_pair_and_previous_issue_with_release_dist(self): raw_event = RawEvent.objects.create( project_id=project.id, event_id=event_id, - data=CanonicalKeyDict({"release": release, "dist": dist}), + data={"release": release, "dist": dist}, ) manager = ProcessingIssueManager() @@ -205,7 +204,7 @@ def test_with_release_dist_pair_and_previous_issue_with_same_release_dist(self, raw_event = RawEvent.objects.create( project_id=project.id, event_id="abc", - data=CanonicalKeyDict({"release": release.version, "dist": dist_2.name}), + data={"release": release.version, "dist": dist_2.name}, ) ProcessingIssue.objects.create( diff --git a/tests/sentry/utils/test_safe.py b/tests/sentry/utils/test_safe.py index 690f7957377062..c9e342b66a6c9a 100644 --- a/tests/sentry/utils/test_safe.py +++ b/tests/sentry/utils/test_safe.py @@ -9,7 +9,6 @@ import pytest from sentry.testutils.cases import TestCase -from sentry.utils.canonical import CanonicalKeyDict from sentry.utils.safe import ( get_path, safe_execute, @@ -123,7 +122,6 @@ def test_get_path_dict(self): assert get_path({"a": 2}, "b") is None assert get_path({"a": {"b": []}}, "a", "b") == [] assert get_path({"a": []}, "a", "b") is None - assert get_path(CanonicalKeyDict({"a": 2}), "a") == 2 def test_get_default(self): assert get_path({"a": 2}, "b", default=1) == 1 @@ -185,10 +183,6 @@ def test_set_dict(self): assert set_path(data, "a", "b", value=42) assert data == {"a": {"b": 42}} - data = CanonicalKeyDict({}) - assert set_path(data, "a", value=42) - assert data == {"a": 42} - def test_set_default(self): data = {"a": {"b": 2}} assert not setdefault_path(data, "a", "b", value=42) diff --git a/tests/snuba/api/endpoints/test_organization_events.py b/tests/snuba/api/endpoints/test_organization_events.py index 6e5a9e3ae1606f..398d67f71d2ccd 100644 --- a/tests/snuba/api/endpoints/test_organization_events.py +++ b/tests/snuba/api/endpoints/test_organization_events.py @@ -5987,7 +5987,7 @@ def test_all_events_fields(self): "user.display": user_data["email"], "device": "Mac", "os": "", - "url": event.interfaces.data["request"].full_url, + "url": event.interfaces["request"].full_url, "runtime": dict(event.get_raw_data()["tags"])["runtime"], "replayId": replay_id.replace("-", ""), "profile.id": profile_id.replace("-", ""), diff --git a/tests/snuba/api/endpoints/test_organization_events_facets_performance.py b/tests/snuba/api/endpoints/test_organization_events_facets_performance.py index a193db075290b8..4f4820e379e362 100644 --- a/tests/snuba/api/endpoints/test_organization_events_facets_performance.py +++ b/tests/snuba/api/endpoints/test_organization_events_facets_performance.py @@ -66,8 +66,8 @@ def store_transaction( tags = [] if project_id is None: project_id = self.project.id - event = load_data("transaction").copy() - event.data["tags"].extend(tags) + event = load_data("transaction") + event["tags"].extend(tags) event.update( { "transaction": name, diff --git a/tests/snuba/api/endpoints/test_organization_events_facets_performance_histogram.py b/tests/snuba/api/endpoints/test_organization_events_facets_performance_histogram.py index fd4dfc1ddab5a3..c18a9673dbc20d 100644 --- a/tests/snuba/api/endpoints/test_organization_events_facets_performance_histogram.py +++ b/tests/snuba/api/endpoints/test_organization_events_facets_performance_histogram.py @@ -61,8 +61,8 @@ def store_transaction( tags = [] if project_id is None: project_id = self.project.id - event = load_data("transaction").copy() - event.data["tags"].extend(tags) + event = load_data("transaction") + event["tags"].extend(tags) event.update( { "transaction": name,