From beb52f26637ccb096feb039ba3afb5c54a184be8 Mon Sep 17 00:00:00 2001 From: Viicos <65306057+Viicos@users.noreply.github.com> Date: Thu, 21 Mar 2024 15:41:51 +0100 Subject: [PATCH] [#3688] Add fixtures to Objects APIs for following tests --- .../fixtures/objects_api_fixtures.json | 20 +++++++ .../fixtures/objecttypes_api_fixtures.json | 55 ++++++++++++++++++- 2 files changed, 74 insertions(+), 1 deletion(-) diff --git a/docker/objects-apis/fixtures/objects_api_fixtures.json b/docker/objects-apis/fixtures/objects_api_fixtures.json index aad3e55bb7..a367d2e740 100644 --- a/docker/objects-apis/fixtures/objects_api_fixtures.json +++ b/docker/objects-apis/fixtures/objects_api_fixtures.json @@ -8,6 +8,15 @@ "_name": "Person" } }, + { + "model": "core.objecttype", + "pk": 2, + "fields": { + "service": 1, + "uuid": "527b8408-7421-4808-a744-43ccb7bdaaa2", + "_name": "File uploads" + } + }, { "model": "token.tokenauth", "pk": "7657474c3d75f56ae0abd0d1bf7994b09964dca9", @@ -32,6 +41,17 @@ "fields": null } }, + { + "model": "token.permission", + "pk": 1, + "fields": { + "token_auth": "7657474c3d75f56ae0abd0d1bf7994b09964dca9", + "object_type": 2, + "mode": "read_and_write", + "use_fields": false, + "fields": null + } + }, { "model": "zgw_consumers.service", "pk": 1, diff --git a/docker/objects-apis/fixtures/objecttypes_api_fixtures.json b/docker/objects-apis/fixtures/objecttypes_api_fixtures.json index 988cf20f44..371db4a1f2 100644 --- a/docker/objects-apis/fixtures/objecttypes_api_fixtures.json +++ b/docker/objects-apis/fixtures/objecttypes_api_fixtures.json @@ -45,6 +45,29 @@ "allow_geometry": true } }, + { + "model": "core.objecttype", + "pk": 3, + "fields": { + "uuid": "527b8408-7421-4808-a744-43ccb7bdaaa2", + "name": "File Uploads", + "name_plural": "File Uploads", + "description": "", + "data_classification": "confidential", + "maintainer_organization": "", + "maintainer_department": "", + "contact_person": "", + "contact_email": "", + "source": "", + "update_frequency": "unknown", + "provider_organization": "", + "documentation_url": "", + "labels": {}, + "created_at": "2024-02-08", + "modified_at": "2024-02-08", + "allow_geometry": true + } + }, { "model": "core.objectversion", "pk": 1, @@ -133,7 +156,9 @@ "name": { "type": "object", "properties": { - "last.name": {"type": "string"} + "last.name": { + "type": "string" + } } }, "submission_pdf_url": { @@ -186,6 +211,34 @@ "status": "published" } }, + { + "model": "core.objectversion", + "pk": 5, + "fields": { + "object_type": 3, + "version": 1, + "created_at": "2024-02-08", + "modified_at": "2024-02-08", + "published_at": "2024-02-08", + "json_schema": { + "type": "object", + "title": "File uploads", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "properties": { + "single_file": { + "type": "string" + }, + "multiple_files": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "status": "published" + } + }, { "model": "token.tokenauth", "pk": "171be5abaf41e7856b423ad513df1ef8f867ff48",