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
def test_set_digest(im, image: str, digest: str): i = img.Image(image) i.set_digest(digest) assert i.digest == digest
def test_image_error(im, image: str, error: str): with pytest.raises(BaseConnaisseurException) as err: img.Image(image) assert error in str(err.value)
def test_str(im, image: str, str_image: str): i = img.Image(image) assert str(i) == str_image
def test_has_digest(im, image: str, digest: bool): i = img.Image(image) assert i.has_digest() == digest