Skip to content

Commit

Permalink
toBusinessName
Browse files Browse the repository at this point in the history
  • Loading branch information
vysakh-menon-aot committed Aug 23, 2023
1 parent 6d055dd commit d24ce2e
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def process(
): # pylint: disable=too-many-branches
"""Process the incoming change of registration request."""
if filing.meta_data and filing.meta_data.get("changeOfRegistration", {}).get(
"toLegalName"
"toBusinessName"
):
change_name(legal_entity, filing, RequestTracker.RequestType.CHANGE_NAME)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ def process(
legal_entity: LegalEntity, filing: Filing
): # pylint: disable=too-many-branches
"""Process the incoming correction request."""
if filing.meta_data and filing.meta_data.get("correction", {}).get("toLegalName"):
if filing.meta_data and filing.meta_data.get("correction", {}).get(
"toBusinessName"
):
change_name(legal_entity, filing, RequestTracker.RequestType.CHANGE_NAME)

with suppress(KeyError, ValueError):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def test_change_of_registration(app, session, client, mocker, legal_type):
}
}
filing = create_filing(json_filing=json_filing, legal_entity_id=legal_entity_id)
filing._meta_data = {"changeOfRegistration": {"toLegalName": "new name"}}
filing._meta_data = {"changeOfRegistration": {"toBusinessName": "new name"}}
filing.save()
filing_id = filing.id

Expand Down Expand Up @@ -160,7 +160,7 @@ def test_bn15_not_available_change_of_registration(
}
}
filing = create_filing(json_filing=json_filing, legal_entity_id=legal_entity_id)
filing._meta_data = {"changeOfRegistration": {"toLegalName": "new name"}}
filing._meta_data = {"changeOfRegistration": {"toBusinessName": "new name"}}
filing.save()
filing_id = filing.id

Expand Down Expand Up @@ -268,7 +268,7 @@ def test_retry_change_of_registration(app, session, client, mocker, request_type
json_filing["filing"]["changeOfRegistration"] = data
filing = create_filing(json_filing=json_filing, legal_entity_id=legal_entity_id)
if request_type == RequestTracker.RequestType.CHANGE_NAME:
filing._meta_data = {"changeOfRegistration": {"toLegalName": "new name"}}
filing._meta_data = {"changeOfRegistration": {"toBusinessName": "new name"}}
filing.save()
filing_id = filing.id

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def test_correction(app, session, client, mocker, legal_type):
}
}
filing = create_filing(json_filing=json_filing, legal_entity_id=legal_entity_id)
filing._meta_data = {"correction": {"toLegalName": "new name"}}
filing._meta_data = {"correction": {"toBusinessName": "new name"}}
filing.save()
filing_id = filing.id

Expand Down Expand Up @@ -156,7 +156,7 @@ def test_bn15_not_available_correction(app, session, client, mocker, legal_type,
}
}
filing = create_filing(json_filing=json_filing, legal_entity_id=legal_entity_id)
filing._meta_data = {"correction": {"toLegalName": "new name"}}
filing._meta_data = {"correction": {"toBusinessName": "new name"}}
filing.save()
filing_id = filing.id

Expand Down Expand Up @@ -257,7 +257,7 @@ def test_retry_correction(app, session, client, mocker, request_type, data):
json_filing["filing"]["correction"] = data
filing = create_filing(json_filing=json_filing, legal_entity_id=legal_entity_id)
if request_type == RequestTracker.RequestType.CHANGE_NAME:
filing._meta_data = {"correction": {"toLegalName": "new name"}}
filing._meta_data = {"correction": {"toBusinessName": "new name"}}
filing.save()
filing_id = filing.id

Expand Down

0 comments on commit d24ce2e

Please sign in to comment.