Skip to content

Commit

Permalink
Fix map_by_schema_version patch test
Browse files Browse the repository at this point in the history
  • Loading branch information
index-git committed Oct 3, 2023
1 parent 7e6ce01 commit 8c3eccf
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
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'])

0 comments on commit 8c3eccf

Please sign in to comment.