diff --git a/requirements-swh.txt b/requirements-swh.txt --- a/requirements-swh.txt +++ b/requirements-swh.txt @@ -1,3 +1,3 @@ swh.core[db,http] >= 0.0.94 -swh.model >= 0.0.51 +swh.model >= 0.0.61 swh.objstorage >= 0.0.40 diff --git a/swh/storage/tests/test_storage.py b/swh/storage/tests/test_storage.py --- a/swh/storage/tests/test_storage.py +++ b/swh/storage/tests/test_storage.py @@ -1358,8 +1358,14 @@ assert add1 == add2 def test_origin_add_validation(self, swh_storage): + """Incorrect formatted origin should fail the validation + + """ with pytest.raises(StorageArgumentException, match='url'): - swh_storage.origin_add([{'type': 'git'}]) + swh_storage.origin_add([{}]) + with pytest.raises(StorageArgumentException, + match='unexpected keyword argument'): + swh_storage.origin_add([{'ul': 'mistyped url key'}]) def test_origin_get_legacy(self, swh_storage): assert swh_storage.origin_get(data.origin) is None