diff --git a/tests/dynamic_data/publications/map_layer_relation/map_layer_relation_test.py b/tests/dynamic_data/publications/map_layer_relation/map_layer_relation_test.py index 0539177ed..7c3d870d4 100644 --- a/tests/dynamic_data/publications/map_layer_relation/map_layer_relation_test.py +++ b/tests/dynamic_data/publications/map_layer_relation/map_layer_relation_test.py @@ -125,6 +125,7 @@ class TestPublication(base_test.TestSingleRestPublication): usernames_to_reserve = [PRIVATE_WORKSPACE] test_cases = [base_test.TestCaseType(key=key, + publication=Publication(f'{WORKSPACE}_{key}', None, None), params=params, rest_args=params['rest_args'], rest_method=params['rest_method'], @@ -190,7 +191,7 @@ def assert_exp_map_layers(self, map, exp_map_layers, exp_operates_on, http_metho }) @staticmethod - def assert_exp_layer_maps(layer, map_operates_on_tuples): + def assert_exp_layer_maps(layer, map_operates_on_tuples, workspaces_to_check): exp_layer_maps = sorted([ (map.workspace, map.name) for map, operates_on in map_operates_on_tuples @@ -200,6 +201,7 @@ def assert_exp_layer_maps(layer, map_operates_on_tuples): found_layer_maps = [ (m['workspace'], m['name']) for m in get_publication_info(*layer, context={'keys': ['layer_maps']})['_layer_maps'] + if m['workspace'] in workspaces_to_check ] assert found_layer_maps == exp_layer_maps @@ -216,7 +218,7 @@ def test_publication(self, map, rest_method, rest_args, params): self.assert_exp_layer_maps(LAYER_HRANICE, [ (MAP_HRANICE, MAP_HRANICE_OPERATES_ON), (map, exp['operates_on'] or []), - ]) + ], workspaces_to_check=[map.workspace, MAP_HRANICE.workspace, PRIVATE_WORKSPACE]) self.assert_exp_map_thumbnail(map, exp['thumbnail']) rest_method.fn(map, args=rest_args) @@ -231,5 +233,5 @@ def test_publication(self, map, rest_method, rest_args, params): self.assert_exp_layer_maps(LAYER_HRANICE, [ (MAP_HRANICE, MAP_HRANICE_OPERATES_ON), (map, exp['operates_on'] or []), - ]) + ], workspaces_to_check=[map.workspace, MAP_HRANICE.workspace, PRIVATE_WORKSPACE]) self.assert_exp_map_thumbnail(map, exp['thumbnail'])