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

24549 Added missing NR request types #3090

Merged
merged 2 commits into from
Nov 27, 2024
Merged

Conversation

severinbeauvais
Copy link
Collaborator

@severinbeauvais severinbeauvais commented Nov 22, 2024

Issue #: bcgov/entity#24549

Description of changes:

  • added missing accepted request types
  • added comments
  • updated an error message
  • moved request types together in mapping array
  • added some missing types
  • fixed and expanded unit tests

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the lear license (Apache 2.0).

@severinbeauvais
Copy link
Collaborator Author

I'm still working through the unit tests, but please review the code changes and lmk if OK.

Copy link
Collaborator

@ArwenQin ArwenQin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code changes look good

@@ -154,7 +190,7 @@ def test_alteration(session, use_nr, new_name, legal_type, new_legal_type, nr_ty

f['filing']['alteration']['nameRequest']['nrNumber'] = identifier
f['filing']['alteration']['nameRequest']['legalName'] = new_name
f['filing']['alteration']['nameRequest']['legalType'] = legal_type
f['filing']['alteration']['nameRequest']['legalType'] = new_legal_type
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So... this and line 204, below, were the reasons my initial tests failed 🤦‍♂️

@@ -244,7 +302,7 @@ def test_validate_numbered_name(session, test_name, legal_type, new_legal_type,
# check that validation failed
assert err
assert HTTPStatus.BAD_REQUEST == err.code
assert err.msg[0]['error'] == err_msg
assert err_msg in err.msg[0]['error']
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed this so we don't have to use the full, 2-line, error messages in the test parameters.

@severinbeauvais
Copy link
Collaborator Author

@vysakh-menon-aot Are you OK with my latest changes (second commit)?

Severin Beauvais added 2 commits November 26, 2024 15:27
- added comments
- updated an error message
- moved request types together in mapping array
- added some missing types
- updated unit tests
Copy link

sonarcloud bot commented Nov 26, 2024

@severinbeauvais severinbeauvais merged commit 6a6dc44 into bcgov:main Nov 27, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants