From 8c3eccfe2d73890c7ba679234577d386a1220122 Mon Sep 17 00:00:00 2001 From: index-git Date: Tue, 3 Oct 2023 08:58:12 +0200 Subject: [PATCH] Fix map_by_schema_version patch test --- .../map_by_schema_version/exp_2_0_0_map_file.json | 2 -- .../map_by_schema_version/exp_3_0_0_map_file.json | 2 -- .../publications/map_by_schema_version/map_test.py | 7 ++++--- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/tests/dynamic_data/publications/map_by_schema_version/exp_2_0_0_map_file.json b/tests/dynamic_data/publications/map_by_schema_version/exp_2_0_0_map_file.json index dfa2708fe..81f1bf17c 100644 --- a/tests/dynamic_data/publications/map_by_schema_version/exp_2_0_0_map_file.json +++ b/tests/dynamic_data/publications/map_by_schema_version/exp_2_0_0_map_file.json @@ -2,7 +2,6 @@ "describedBy": "https://raw.githubusercontent.com/hslayers/map-compositions/2.0.0/schema.json", "schema_version": "2.0.0", "abstract": "World places and boundaries abstract", - "title": "map_v2_0_0_post", "extent": [ -35.0, -48.5, @@ -75,7 +74,6 @@ "wmsMaxScale": 0 } ], - "name": "map_v2_0_0_post", "user": { "email": "", "name": "test_map_json_workspace" diff --git a/tests/dynamic_data/publications/map_by_schema_version/exp_3_0_0_map_file.json b/tests/dynamic_data/publications/map_by_schema_version/exp_3_0_0_map_file.json index 2ba03d295..fd4f9fc5b 100644 --- a/tests/dynamic_data/publications/map_by_schema_version/exp_3_0_0_map_file.json +++ b/tests/dynamic_data/publications/map_by_schema_version/exp_3_0_0_map_file.json @@ -2,8 +2,6 @@ "describedBy": "https://raw.githubusercontent.com/hslayers/map-compositions/3.0.0/schema.json", "schema_version": "2.0.0", "abstract": "World places and boundaries abstract", - "title": "map_v3_0_0_post", - "name": "map_v3_0_0_post", "extent": [ -35.0, -48.5, diff --git a/tests/dynamic_data/publications/map_by_schema_version/map_test.py b/tests/dynamic_data/publications/map_by_schema_version/map_test.py index 65c90df2e..8c9cec566 100644 --- a/tests/dynamic_data/publications/map_by_schema_version/map_test.py +++ b/tests/dynamic_data/publications/map_by_schema_version/map_test.py @@ -70,8 +70,10 @@ def assert_get_workspace_map_file(map, exp_file): resp = process_client.get_workspace_map_file(map.type, map.workspace, map.name, headers=headers) with open(exp_file, encoding='utf-8') as file: - orig_json = json.load(file) - assert resp == orig_json + exp_json = json.load(file) + exp_json['name'] = map.name + exp_json['title'] = resp['title'] + assert resp == exp_json def test_publication(self, map, rest_method, rest_args, params): rest_method.fn(map, args=rest_args) @@ -95,5 +97,4 @@ def test_publication(self, map, rest_method, rest_args, params): exp_thumbnail = os.path.join(DIRECTORY, 'exp_thumbnail.png') asserts_publ.internal.thumbnail_equals(map.workspace, map.type, map.name, exp_thumbnail, max_diffs=0) - self.assert_get_workspace_map_file(map, params['exp_map_file'])