Skip to content

Commit

Permalink
Make dynamic publication_name and workspace_name in wrong_input t…
Browse files Browse the repository at this point in the history
…ests' error data
  • Loading branch information
index-git committed Oct 17, 2023
1 parent b0cec4c commit 0a63f6c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions tests/dynamic_data/publications/wrong_input/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,8 @@ def format_exception(exception_info: dict, publication: Publication, parametriza
if 'similar_filenames_mapping' in exception_info['data']:
exception_info['data']['similar_filenames_mapping'] = {key.format(**format_variables): value.format(**format_variables) for
key, value in exception_info['data']['similar_filenames_mapping'].items()}
if 'publication_name' in exception_info['data']:
exception_info['data']['publication_name'] = exception_info['data']['publication_name'].format(**format_variables)
if 'workspace_name' in exception_info['data']:
exception_info['data']['workspace_name'] = exception_info['data']['workspace_name'].format(**format_variables)

Original file line number Diff line number Diff line change
Expand Up @@ -1315,7 +1315,7 @@ class Key(Enum):
Key.RUN_ONLY_CASES: frozenset([RestMethod, WithChunksDomain.FALSE, CompressDomain.FALSE]),
Key.SPECIFIC_CASES: {},
},
'write_rights_without': {
'write_rights_without_map': {
Key.PUBLICATION_TYPE: process_client.MAP_TYPE,
Key.WORKSPACE: OWNER,
Key.POST_BEFORE_TEST_ARGS: {
Expand Down Expand Up @@ -1344,8 +1344,8 @@ class Key(Enum):
'message': 'Owner of the personal workspace have to keep write right.',
'actor_name': 'wrong_input_editor',
'owner': 'wrong_input_owner',
'publication_name': 'map_write_rights_without_patch',
'workspace_name': 'wrong_input_owner'
'publication_name': '{publication_name}',
'workspace_name': '{workspace}',
},
},
Key.MANDATORY_CASES: frozenset([RestMethod.PATCH, WithChunksDomain.FALSE, CompressDomain.FALSE]),
Expand Down

0 comments on commit 0a63f6c

Please sign in to comment.