Skip to content

Commit

Permalink
23251 - Updated Limited Restoration to Full Approval Type (bcgov#3017)
Browse files Browse the repository at this point in the history
  • Loading branch information
ArwenQin authored Oct 2, 2024
1 parent 363b55d commit 69d0d25
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ def validate_approval_type(filing: dict, restoration_type: str, limited_restorat
msg = []
approval_type = get_str(filing, APPROVAL_TYPE_PATH)
if restoration_type in ('limitedRestorationExtension', 'limitedRestorationToFull') and \
limited_restoration.approval_type != approval_type:
msg.append({'error': f'Must provide approval type with value of {limited_restoration.approval_type}.',
limited_restoration.approval_type == 'courtOrder' and approval_type != 'courtOrder':
msg.append({'error': 'Must provide approval type with value of courtOrder.',
'path': APPROVAL_TYPE_PATH})
return msg

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,8 @@ def test_validate_expiry_date(session, test_name, restoration_type, delta_date,
[
('FAIL', ['fullRestoration', 'limitedRestoration', 'limitedRestorationExtension', 'limitedRestorationToFull'],
['BC', 'BEN', 'ULC', 'CC'], None, 'courtOrder', HTTPStatus.UNPROCESSABLE_ENTITY, None),
('FAIL', ['limitedRestorationExtension', 'limitedRestorationToFull'], ['BC', 'BEN', 'ULC', 'CC'],
'courtOrder', 'registrar', HTTPStatus.BAD_REQUEST, 'Must provide approval type with value of registrar.'),
('SUCCESS', ['limitedRestorationExtension', 'limitedRestorationToFull'], ['BC', 'BEN', 'ULC', 'CC'],
'courtOrder', 'registrar', None, None),
('FAIL', ['limitedRestorationExtension', 'limitedRestorationToFull'], ['BC', 'BEN', 'ULC', 'CC'],
'registrar', 'courtOrder', HTTPStatus.BAD_REQUEST, 'Must provide approval type with value of courtOrder.'),
('SUCCESS', ['fullRestoration', 'limitedRestoration', 'limitedRestorationExtension', 'limitedRestorationToFull'],
Expand Down

0 comments on commit 69d0d25

Please sign in to comment.