|
4 | 4 | import os |
5 | 5 | from hashlib import sha256 |
6 | 6 | from pathlib import Path |
7 | | -from typing import Any, Optional |
| 7 | +from typing import Any |
8 | 8 |
|
9 | 9 | import pretend |
10 | 10 | import pytest |
@@ -136,12 +136,10 @@ def test_verify_github_attested(self) -> None: |
136 | 136 | assert predicate_type == "https://docs.pypi.org/attestations/publish/v1" |
137 | 137 | assert predicate == {} |
138 | 138 |
|
139 | | - @pytest.mark.parametrize("claims", (None, {}, {"ref": "refs/tags/v0.0.4a2"})) |
140 | | - def test_verify_from_github_publisher(self, claims: Optional[dict]) -> None: |
| 139 | + def test_verify_from_github_publisher(self) -> None: |
141 | 140 | publisher = impl.GitHubPublisher( |
142 | 141 | repository="trailofbits/pypi-attestation-models", |
143 | 142 | workflow="release.yml", |
144 | | - claims=claims, |
145 | 143 | ) |
146 | 144 |
|
147 | 145 | bundle = Bundle.from_json(gh_signed_dist_bundle_path.read_bytes()) |
@@ -586,23 +584,6 @@ def test_wrong_kind(self) -> None: |
586 | 584 | with pytest.raises(ValueError, match="Input should be 'GitLab'"): |
587 | 585 | impl.GitLabPublisher(kind="GitHub", repository="foo/bar") |
588 | 586 |
|
589 | | - def test_claims(self) -> None: |
590 | | - raw = { |
591 | | - "kind": "GitHub", |
592 | | - "repository": "foo/bar", |
593 | | - "workflow": "publish.yml", |
594 | | - "claims": { |
595 | | - "this": "is-preserved", |
596 | | - "this-too": 123, |
597 | | - }, |
598 | | - } |
599 | | - pub: impl.Publisher = TypeAdapter(impl.Publisher).validate_python(raw) |
600 | | - |
601 | | - assert pub.claims == { |
602 | | - "this": "is-preserved", |
603 | | - "this-too": 123, |
604 | | - } |
605 | | - |
606 | 587 |
|
607 | 588 | class TestProvenance: |
608 | 589 | def test_version(self) -> None: |
|
0 commit comments