Skip to content

Commit

Permalink
test_verify_delegation_coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
dholth committed Aug 21, 2023
1 parent 3796098 commit 86ffecf
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions tests/test_authentication.py
Original file line number Diff line number Diff line change
Expand Up @@ -463,13 +463,16 @@ def test_verify_root():
root_v2_edited["signed"]["type"] = "key_mgr"
with pytest.raises(
ValueError,
match='Expected two instances of root metadata.',
match="Expected two instances of root metadata.",
):
verify_root(TEST_ROOT_MD_V1, root_v2_edited)


# def test_verify_delegation():
# """
# Tests conda_content_trust.authentication.verify_delegation
# """
# raise NotImplementedError('verify_delegation requires unit tests.')
def test_verify_delegation_coverage():
"""
Coverage tests for conda_content_trust.authentication.verify_delegation
"""
with pytest.raises(TypeError, match="string"):
verify_delegation(42, False, False)
with pytest.raises(TypeError, match="boolean"):
verify_delegation("delegation", False, False, gpg=42) # type: ignore

0 comments on commit 86ffecf

Please sign in to comment.