Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix map_by_schema_version patch test #936

Merged
merged 1 commit into from
Oct 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -75,7 +74,6 @@
"wmsMaxScale": 0
}
],
"name": "map_v2_0_0_post",
"user": {
"email": "",
"name": "test_map_json_workspace"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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'])