Skip to content

Commit

Permalink
ref: avoid clobbering base class do_request (#74881)
Browse files Browse the repository at this point in the history
mypy 1.11 points out the inconsistent signatures here

<!-- Describe your PR here. -->
  • Loading branch information
asottile-sentry authored and Christinarlong committed Jul 26, 2024
1 parent e7159e1 commit 1b71b3a
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions tests/sentry/api/endpoints/test_organization_traces.py
Original file line number Diff line number Diff line change
Expand Up @@ -859,7 +859,7 @@ def test_matching_tag_metrics_but_no_matching_spans(self):
class OrganizationTraceSpansEndpointTest(OrganizationTracesEndpointTestBase):
view = "sentry-api-0-organization-trace-spans"

def do_request(self, trace_id, query, features=None, **kwargs):
def _do_request(self, trace_id, query, features=None, **kwargs):
if features is None:
features = ["organizations:performance-trace-explorer"]
with self.feature(features):
Expand All @@ -880,18 +880,18 @@ def test_no_feature(self):
query = {
"project": [self.project.id],
}
response = self.do_request(uuid4().hex, query, features=[])
response = self._do_request(uuid4().hex, query, features=[])
assert response.status_code == 404, response.data

def test_no_project(self):
response = self.do_request(uuid4().hex, {})
response = self._do_request(uuid4().hex, {})
assert response.status_code == 404, response.data

def test_bad_params_missing_field(self):
query = {
"project": [self.project.id],
}
response = self.do_request(uuid4().hex, query)
response = self._do_request(uuid4().hex, query)
assert response.status_code == 400, response.data
assert response.data == {
"field": [
Expand All @@ -916,7 +916,7 @@ def test_get_spans_for_trace(self):
"sort": "id",
}

response = self.do_request(trace_id, query)
response = self._do_request(trace_id, query)
assert response.status_code == 200, response.data
assert response.data["meta"] == {
"dataset": "unknown",
Expand Down Expand Up @@ -955,7 +955,7 @@ def test_get_spans_for_trace_matching_tags(self):
"query": user_query,
}

response = self.do_request(trace_id, query)
response = self._do_request(trace_id, query)
assert response.status_code == 200, response.data
assert response.data["meta"] == {
"dataset": "unknown",
Expand Down Expand Up @@ -1010,7 +1010,7 @@ def test_get_spans_for_trace_matching_tags_metrics(self):
if user_query:
query["query"] = user_query

response = self.do_request(trace_id, query)
response = self._do_request(trace_id, query)
assert response.status_code == 200, response.data
assert response.data["meta"] == {
"dataset": "unknown",
Expand Down

0 comments on commit 1b71b3a

Please sign in to comment.