예제 #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