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 f4eae3a45..2393a16b7 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 @@ -126,6 +126,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'], @@ -191,7 +192,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 @@ -201,6 +202,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 @@ -217,7 +219,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) @@ -232,5 +234,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'])