endpoints.appr: move to new v22 format
This commit is contained in:
parent
c271b1f386
commit
155cb65f7d
9 changed files with 279 additions and 251 deletions
11
endpoints/appr/test/test_digest_prefix.py
Normal file
11
endpoints/appr/test/test_digest_prefix.py
Normal file
|
@ -0,0 +1,11 @@
|
|||
import pytest
|
||||
from endpoints.appr.models_oci import _strip_sha256_header
|
||||
|
||||
|
||||
@pytest.mark.parametrize('digest,expected', [
|
||||
('sha256:251b6897608fb18b8a91ac9abac686e2e95245d5a041f2d1e78fe7a815e6480a',
|
||||
'251b6897608fb18b8a91ac9abac686e2e95245d5a041f2d1e78fe7a815e6480a'),
|
||||
('251b6897608fb18b8a91ac9abac686e2e95245d5a041f2d1e78fe7a815e6480a',
|
||||
'251b6897608fb18b8a91ac9abac686e2e95245d5a041f2d1e78fe7a815e6480a'),])
|
||||
def test_stip_sha256(digest, expected):
|
||||
assert _strip_sha256_header(digest) == expected
|
Reference in a new issue