Skip to content

Commit c73250a

Browse files
committed
[OJ-54730] Address SonarCloud warnings on regression test
- Add return type hint to test method. - Replace hex-like merge hash literal with a non-hex placeholder so the detect-secrets pragma comment is no longer needed.
1 parent 08c794a commit c73250a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tests/test_bitbucket_cloud_adapter.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ def test_get_prs_merge_commit_uses_destination_repo(self):
358358
'test_project', dest_slug, 'abc123merge'
359359
)
360360

361-
def test_get_prs_merge_commit_404_does_not_skip_pr(self):
361+
def test_get_prs_merge_commit_404_does_not_skip_pr(self) -> None:
362362
# Regression test for OJ-54730: when Bitbucket Cloud has garbage-collected a PR's
363363
# merge commit, get_commit raises HTTPError(404). The PR must still be returned,
364364
# just with merge_commit left unset.
@@ -370,7 +370,7 @@ def test_get_prs_merge_commit_404_does_not_skip_pr(self):
370370
'title': 'Merged PR with stale merge commit',
371371
'description': '',
372372
'state': 'MERGED',
373-
'merge_commit': {'hash': '9a9601098ec2'}, # pragma: allowlist secret
373+
'merge_commit': {'hash': 'stalemergehash'},
374374
'created_on': '2020-01-01T00:00:00+00:00',
375375
'updated_on': '2020-01-02T00:00:00+00:00',
376376
'author': {

0 commit comments

Comments
 (0)