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

(cherry picked from commit e463529)
  • Loading branch information
index-git authored and jirik committed Nov 9, 2023
1 parent 46b9af0 commit 0c2a5a8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 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,7 @@ 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 @@ -1345,8 +1345,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': 'patch_map_write_rights_without_owner_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 0c2a5a8

Please sign in to comment.