diff --git a/setup.cfg b/setup.cfg index 9f68160..fc5de26 100644 --- a/setup.cfg +++ b/setup.cfg @@ -57,7 +57,6 @@ tests = pytest-lazy-fixture>=0.6.3 sphinx>=4.5.0 tripoli~=2.0.0 - docker-services-cli<=0.7.1 opensearch2 = invenio-search[opensearch2]>=2.1.0,<3.0.0 diff --git a/tests/conftest.py b/tests/conftest.py index 97efa74..6aa1816 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -293,6 +293,39 @@ def minimal_record(): } +@pytest.fixture(scope="module") +def minimal_record_marketplace(): + """Minimal record data as dict coming from the external world.""" + return { + "pids": {}, + "access": { + "record": "public", + "files": "public", + }, + "files": { + "enabled": False, # Most tests don't care about files + }, + "metadata": { + "publication_date": "2020-06-01", + "resource_type": {"id": "image-photo"}, + "creators": [ + { + "person_or_org": { + "family_name": "Brown", + "given_name": "Troy", + "type": "personal", + } + } + ], + "title": "A Romans story", + "marketplace": { + "launch_url": "https://test.com", + "vendor_contact": "email@test.com", + }, + }, + } + + @pytest.fixture(scope="module") def record_resource_simple( location, resource_type_v, authenticated_identity, minimal_record @@ -325,11 +358,11 @@ def record_package_simple( @pytest.fixture(scope="module") def record_marketplace_item_simple( - location, resource_type_v, authenticated_identity, minimal_record + location, resource_type_v, authenticated_identity, minimal_record_marketplace ): """Basic Package Record.""" record_item = current_marketplace_service.create( - authenticated_identity, minimal_record + authenticated_identity, minimal_record_marketplace ) record_item = current_marketplace_service.publish( authenticated_identity, record_item["id"]