Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

868 make some tests optional #947

Merged
merged 2 commits into from
Oct 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

TEST_CASES = {
'post': {
'test_type': EnumTestTypes.MANDATORY,
'post_before_test_args': {},
'exp_before_rest_method': {
'map_layers': None,
Expand All @@ -48,6 +49,7 @@
},
},
'delete': {
'test_type': EnumTestTypes.OPTIONAL,
'post_before_test_args': {
'file_paths': [os.path.join(DIRECTORY, 'internal_wms_and_wfs.json')],
},
Expand All @@ -69,6 +71,7 @@
},
},
'patch_map_with_unauthorized_layer': {
'test_type': EnumTestTypes.OPTIONAL,
'post_before_test_args': {
'file_paths': [os.path.join(DIRECTORY, 'internal_hranice_private.json')],
},
Expand All @@ -89,6 +92,7 @@
},
},
'patch_map_with_different_layers': {
'test_type': EnumTestTypes.OPTIONAL,
'post_before_test_args': {
'file_paths': [os.path.join(DIRECTORY, 'internal_wms_and_wfs.json')],
},
Expand Down Expand Up @@ -131,7 +135,7 @@ class TestPublication(base_test.TestSingleRestPublication):
rest_args=params['rest_args'],
rest_method=params['rest_method'],
post_before_test_args=params['post_before_test_args'],
type=EnumTestTypes.MANDATORY,
type=params['test_type'],
) for key, params in TEST_CASES.items()]

def before_class(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ class TestPublication(base_test.TestSingleRestPublication):
publication=lambda publ_def, cls: Publication(cls.workspace,
publ_def.type,
None),
type=EnumTestTypes.MANDATORY,
type=EnumTestTypes.OPTIONAL,
specific_types={
(base_test_classes.RestMethodAll.POST, PublicationTypes.LAYER): EnumTestTypes.MANDATORY
},
)]

def test_publication(self, publication, rest_method):
Expand Down
Loading