-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create test for refresh map thumbnail after WFS-T query to included l…
…ayer
- Loading branch information
Showing
3 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
from test import process_client, util as test_util | ||
from test.data import map as map_data, wfs as data_wfs | ||
import pytest | ||
|
||
from layman import app | ||
from layman.map.filesystem import thumbnail | ||
|
||
|
||
@pytest.mark.usefixtures('ensure_layman') | ||
def test_map_refresh_after_layer_change(): | ||
workspace = 'test_map_refresh_after_layer_change_workspace' | ||
layer = 'test_map_refresh_after_layer_change_layer' | ||
map = 'test_map_refresh_after_layer_change_map' | ||
bbox = (1571000.0, 6268800.0, 1572590.8542062, 6269876.33561699) | ||
|
||
process_client.publish_workspace_layer(workspace, layer) | ||
|
||
map_file = map_data.create_map_with_internal_layers_file([(workspace, layer)], extent_3857=bbox) | ||
process_client.publish_workspace_map(workspace, map, file_paths=[map_file]) | ||
|
||
expected_thumbnail_path = f'/code/test/data/thumbnail/map_with_internal_layer_basic.png' | ||
with app.app_context(): | ||
thumbnail_path = thumbnail.get_map_thumbnail_path(workspace, map) | ||
diffs = test_util.compare_images(expected_thumbnail_path, thumbnail_path) | ||
assert diffs < 10, expected_thumbnail_path | ||
|
||
data_xml = data_wfs.get_wfs20_insert_points(workspace, layer, ) | ||
process_client.post_wfst(data_xml) | ||
process_client.wait_for_publication_status(workspace, process_client.LAYER_TYPE, layer) | ||
|
||
process_client.wait_for_publication_status(workspace, process_client.MAP_TYPE, map) | ||
|
||
expected_thumbnail_path = f'/code/test/data/thumbnail/map_with_internal_layer_basic_after_wfst.png' | ||
with app.app_context(): | ||
thumbnail_path = thumbnail.get_map_thumbnail_path(workspace, map) | ||
diffs = test_util.compare_images(expected_thumbnail_path, thumbnail_path) | ||
assert diffs < 10, expected_thumbnail_path | ||
|
||
process_client.delete_workspace_map(workspace, map) | ||
process_client.delete_workspace_layer(workspace, layer) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.