|
@@ -14,7 +14,7 @@ from snuba_sdk.function import Function
|
|
|
|
|
|
from sentry.discover.models import TeamKeyTransaction
|
|
|
from sentry.issues.grouptype import ProfileFileIOGroupType
|
|
|
-from sentry.models import ApiKey, ProjectTransactionThreshold, ReleaseStages
|
|
|
+from sentry.models import ProjectTransactionThreshold, ReleaseStages
|
|
|
from sentry.models.projectteam import ProjectTeam
|
|
|
from sentry.models.transaction_threshold import (
|
|
|
ProjectTransactionThresholdOverride,
|
|
@@ -88,7 +88,7 @@ class OrganizationEventsEndpointTestBase(APITestCase, SnubaTestCase):
|
|
|
return load_data(platform, timestamp=timestamp, start_timestamp=start_timestamp, **kwargs)
|
|
|
|
|
|
|
|
|
-@region_silo_test
|
|
|
+@region_silo_test(stable=True)
|
|
|
class OrganizationEventsEndpointTest(OrganizationEventsEndpointTestBase, PerformanceIssueTestCase):
|
|
|
def test_no_projects(self):
|
|
|
response = self.do_request({})
|
|
@@ -111,9 +111,7 @@ class OrganizationEventsEndpointTest(OrganizationEventsEndpointTestBase, Perform
|
|
|
|
|
|
# Project ID cannot be inferred when using an org API key, so that must
|
|
|
# be passed in the parameters
|
|
|
- api_key = ApiKey.objects.create(
|
|
|
- organization_id=self.organization.id, scope_list=["org:read"]
|
|
|
- )
|
|
|
+ api_key = self.create_api_key(organization=self.organization, scope_list=["org:read"])
|
|
|
query = {"field": ["project.name", "environment"], "project": [self.project.id]}
|
|
|
|
|
|
url = self.reverse_url()
|
|
@@ -4199,9 +4197,7 @@ class OrganizationEventsEndpointTest(OrganizationEventsEndpointTestBase, Perform
|
|
|
mock.return_value = {}
|
|
|
# Project ID cannot be inferred when using an org API key, so that must
|
|
|
# be passed in the parameters
|
|
|
- api_key = ApiKey.objects.create(
|
|
|
- organization_id=self.organization.id, scope_list=["org:read"]
|
|
|
- )
|
|
|
+ api_key = self.create_api_key(organization=self.organization, scope_list=["org:read"])
|
|
|
|
|
|
query = {
|
|
|
"field": ["project.name", "environment"],
|