diff --git a/data/registry_model/test/test_pre_oci_model.py b/data/registry_model/test/test_pre_oci_model.py index 3d7140475..6e81c3fff 100644 --- a/data/registry_model/test/test_pre_oci_model.py +++ b/data/registry_model/test/test_pre_oci_model.py @@ -12,9 +12,10 @@ def pre_oci_model(initialized_db): @pytest.mark.parametrize('names, expected', [ (['unknown'], None), - (['latest'], 'latest'), - (['latest', 'prod'], 'latest'), - (['foo', 'prod'], 'prod'), + (['latest'], {'latest'}), + (['latest', 'prod'], {'latest', 'prod'}), + (['latest', 'prod', 'another'], {'latest', 'prod'}), + (['foo', 'prod'], {'prod'}), ]) def test_find_matching_tag(names, expected, pre_oci_model): repo = model.repository.get_repository('devtable', 'simple') @@ -23,12 +24,12 @@ def test_find_matching_tag(names, expected, pre_oci_model): if expected is None: assert found is None else: - assert found.name == expected + assert found.name in expected @pytest.mark.parametrize('repo_namespace, repo_name, expected', [ - ('devtable', 'simple', 'latest'), - ('buynlarge', 'orgrepo', 'latest'), + ('devtable', 'simple', {'latest'}), + ('buynlarge', 'orgrepo', {'latest', 'prod'}), ]) def test_get_most_recent_tag(repo_namespace, repo_name, expected, pre_oci_model): repo = model.repository.get_repository(repo_namespace, repo_name) @@ -37,4 +38,4 @@ def test_get_most_recent_tag(repo_namespace, repo_name, expected, pre_oci_model) if expected is None: assert found is None else: - assert found.name == expected + assert found.name in expected