Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ref: remove erroneously overridden do_request #74800

Merged
merged 1 commit into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def setUp(self):
kwargs={"organization_id_or_slug": self.project.organization.slug},
)

def do_request(self, data, url=None, features=None):
def _do_request(self, data, url=None, features=None):
if features is None:
features = {"organizations:discover-basic": True}
features.update(self.features)
Expand All @@ -47,7 +47,7 @@ def test_throughput_epm_hour_rollup(self):
)

for axis in ["epm()", "spm()"]:
response = self.do_request(
response = self._do_request(
data={
"start": iso_format(self.day_ago),
"end": iso_format(self.day_ago + timedelta(hours=6)),
Expand Down Expand Up @@ -81,7 +81,7 @@ def test_throughput_epm_day_rollup(self):
)

for axis in ["epm()", "spm()"]:
response = self.do_request(
response = self._do_request(
data={
"start": iso_format(self.day_ago),
"end": iso_format(self.day_ago + timedelta(hours=24)),
Expand Down Expand Up @@ -113,7 +113,7 @@ def test_throughput_epm_hour_rollup_offset_of_hour(self):
)

for axis in ["epm()", "spm()"]:
response = self.do_request(
response = self._do_request(
data={
"start": iso_format(self.day_ago + timedelta(minutes=30)),
"end": iso_format(self.day_ago + timedelta(hours=6, minutes=30)),
Expand Down Expand Up @@ -147,7 +147,7 @@ def test_throughput_eps_minute_rollup(self):
)

for axis in ["eps()", "sps()"]:
response = self.do_request(
response = self._do_request(
data={
"start": iso_format(self.day_ago),
"end": iso_format(self.day_ago + timedelta(minutes=6)),
Expand Down Expand Up @@ -187,7 +187,7 @@ def test_top_events(self):
]
)

response = self.do_request(
response = self._do_request(
data={
"start": iso_format(self.day_ago),
"end": iso_format(self.day_ago + timedelta(minutes=6)),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class OrganizationEventsStatsSpansMetricsEndpointTest(MetricsEnhancedPerformance
METRIC_STRINGS = [
"foo_transaction",
]
features = {"organizations:discover-basic": True}

def setUp(self):
super().setUp()
Expand All @@ -31,13 +32,6 @@ def setUp(self):
"organizations:performance-use-metrics": True,
}

def do_request(self, data, url=None, features=None):
if features is None:
features = {"organizations:discover-basic": True}
features.update(self.features)
with self.feature(features):
return self.client.get(self.url if url is None else url, data=data, format="json")

# These throughput tests should roughly match the ones in OrganizationEventsStatsEndpointTest
@pytest.mark.querybuilder
def test_throughput_epm_hour_rollup(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ class OrganizationMeasurementsMetaEndpoint(MetricsEnhancedPerformanceTestCase):
METRIC_STRINGS = [
"d:transactions/measurements.something_custom@millisecond",
]
features = {"organizations:discover-basic": True}

def setUp(self):
super().setUp()
Expand All @@ -25,13 +26,6 @@ def setUp(self):
)
self.features = {"organizations:performance-use-metrics": True}

def do_request(self, data, url=None, features=None):
if features is None:
features = {"organizations:discover-basic": True}
features.update(self.features)
with self.feature(features):
return self.client.get(self.url if url is None else url, data=data, format="json")

def test_simple(self):
self.store_transaction_metric(
1,
Expand Down
Loading