Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/github_actions/softprops/action-g…
Browse files Browse the repository at this point in the history
…h-release-2.0.8
  • Loading branch information
kairoaraujo authored Jul 27, 2024
2 parents 0dfe400 + 47dd369 commit 1c42624
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 15 deletions.
6 changes: 3 additions & 3 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 1 addition & 4 deletions repository_service_tuf/cli/admin/sign.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,7 @@


def _parse_pending_data(pending_roles_resp: Dict[str, Any]) -> Dict[str, Any]:
data = pending_roles_resp.get("data")
if data is None:
error = "'data' field missing from api server response/file input"
raise click.ClickException(error)
data = pending_roles_resp.get("data", {})

pending_roles: Dict[str, Dict[str, Any]] = data.get("metadata", {})
if len(pending_roles) == 0:
Expand Down
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ pyflakes==3.2.0; python_version >= '3.8'
pygments==2.18.0; python_version >= '3.8'
pyproject-api==1.7.1; python_version >= '3.8'
pyproject-hooks==1.1.0; python_version >= '3.7'
pytest==8.3.1; python_version >= '3.8'
pytest==8.3.2; python_version >= '3.8'
pytest-cov==5.0.0; python_version >= '3.8'
pytest-xdist==3.6.1; python_version >= '3.8'
pyyaml==6.0.1; python_version >= '3.6'
Expand Down
7 changes: 0 additions & 7 deletions tests/unit/cli/admin/test_sign.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,13 +370,6 @@ def test__parse_pending_data_missing_metadata(self):

assert "No metadata available for signing" in str(e)

def test__parse_pending_data_missing_data(self):
with pytest.raises(click.ClickException) as e:
sign._parse_pending_data({})

err = "'data' field missing from api server response/file input"
assert err in str(e)

def test__get_pending_roles_request(self, monkeypatch):
fake_settings = pretend.stub(SERVER=None)
fake_json = pretend.stub()
Expand Down

0 comments on commit 1c42624

Please sign in to comment.