From de04b6d511d3052e0e0e422d4dbadb70a8ad9ee6 Mon Sep 17 00:00:00 2001 From: Jiri Kozel Date: Mon, 27 Nov 2023 17:17:13 +0100 Subject: [PATCH] Make one part of test_post_layers_long_and_delete_it optional --- src/layman/layer/rest_workspace_test.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/layman/layer/rest_workspace_test.py b/src/layman/layer/rest_workspace_test.py index af695ef13..db428ec2c 100644 --- a/src/layman/layer/rest_workspace_test.py +++ b/src/layman/layer/rest_workspace_test.py @@ -910,9 +910,10 @@ def test_post_layers_long_and_delete_it(client): chain_info = util.get_layer_chain(workspace, layername) assert chain_info is not None and not celery_util.is_chain_ready(chain_info) layer_info = util.get_layer_info(workspace, layername) - keys_to_check = ['db', 'wms', 'wfs', 'thumbnail', 'metadata'] - for key_to_check in keys_to_check: - assert 'status' in layer_info[key_to_check] + if layer_info['layman_metadata']['publication_status'] == 'UPDATING': + keys_to_check = ['db', 'wms', 'wfs', 'thumbnail', 'metadata'] + for key_to_check in keys_to_check: + assert 'status' in layer_info[key_to_check] rest_path = url_for('rest_workspace_layer.delete_layer', workspace=workspace, layername=layername) response = client.delete(rest_path)