diff --git a/data/model/test/test_model_blob.py b/data/model/test/test_model_blob.py index 7adb2f5bf..343a3c72c 100644 --- a/data/model/test/test_model_blob.py +++ b/data/model/test/test_model_blob.py @@ -39,3 +39,11 @@ def test_get_or_create_shared_blob(initialized_db): again = model.blob.get_or_create_shared_blob('sha256:abcdef', 'somecontent', storage) assert shared == again + + +def test_lookup_repo_storages_by_content_checksum(initialized_db): + for image in database.Image.select(): + found = model.storage.lookup_repo_storages_by_content_checksum(image.repository, + [image.storage.content_checksum]) + assert len(found) == 1 + assert found[0].content_checksum == image.storage.content_checksum