Skip to content

Resolve Failing Tests: Correction to adanced_usage=True #1074

New issue

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

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

Already on GitHub? # to your account

Merged
merged 3 commits into from
Nov 10, 2022
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
2 changes: 2 additions & 0 deletions atlassian/bitbucket/cloud/repositories/pipelines.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,11 +243,13 @@ def log(self, start=None, end=None):
response = None
try:
response = self.get("log", headers=headers, advanced_mode=True)
response.raise_for_status()
except HTTPError as e:
# A 404 indicates that no log is present.
if not e.response.status_code == 404:
# Rethrow the exception
raise
return None

if response is None:
if start is None:
Expand Down
1 change: 1 addition & 0 deletions tests/test_bitbucket_cloud_oo.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ def test_get_pipeline_step(self):
assert result["uuid"] == "{PipelineStep1Uuid}", "Result of [get_pipeline_step(...)]"

def test_get_pipeline_step_log_1(self):
"""Test Not Found"""
result = BITBUCKET.get_pipeline_step_log(
"TestWorkspace1", "testrepository1", "{PipelineUuid}", "{PipelineStep1Uuid}"
)
Expand Down