示例#1
0
def test_image(im, image: str, name: str, tag: str, digest: str, repo: str,
               registry: str):
    i = img.Image(image)
    assert i.name == name
    assert i.tag == tag
    assert i.digest == digest
    assert i.repository == repo
    assert i.registry == registry
示例#2
0
def test_set_digest(im, image: str, digest: str):
    i = img.Image(image)
    i.set_digest(digest)
    assert i.digest == digest
示例#3
0
def test_image_error(im, image: str, error: str):
    with pytest.raises(BaseConnaisseurException) as err:
        img.Image(image)
    assert error in str(err.value)
示例#4
0
def test_str(im, image: str, str_image: str):
    i = img.Image(image)
    assert str(i) == str_image
示例#5
0
def test_has_digest(im, image: str, digest: bool):
    i = img.Image(image)
    assert i.has_digest() == digest