Skip to content

Commit

Permalink
fix linting
Browse files Browse the repository at this point in the history
Signed-off-by: Hongjing Chen <[email protected]>
  • Loading branch information
chenhongjing committed Mar 14, 2024
1 parent 102d0cf commit ea28328
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 11 deletions.
3 changes: 1 addition & 2 deletions legal-api/tests/unit/models/test_alternate_name.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def test_find_by_name_type(session):
with nested_session(session):
identifier = "BC1234567"
legal_entity = factory_legal_entity(identifier=identifier)

alternate_name = factory_alternate_name(
name="ABC Ltd.",
name_type=AlternateName.NameType.DBA,
Expand Down Expand Up @@ -139,4 +139,3 @@ def test_find_by_name_type(session):
assert len(res) == 2
assert res[0].name == "NAME TRANSLATION 1"
assert res[1].name == "NAME TRANSLATION 2"

10 changes: 3 additions & 7 deletions legal-api/tests/unit/models/test_legal_entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -915,15 +915,11 @@ def test_alternate_names(session, test_name, legal_entities_info, alternate_name

if alternate_names_info:
for alternate_name_info in alternate_names_info:
business_start_date = datetime.strptime(
alternate_name_info["businessStartDate"], "%Y-%m-%dT%H:%M:%S%z"
)

business_start_date = datetime.strptime(alternate_name_info["businessStartDate"], "%Y-%m-%dT%H:%M:%S%z")

alternate_name_identifier = alternate_name_info["identifier"]

start_date = datetime.strptime(
alternate_name_info["startDate"], "%Y-%m-%dT%H:%M:%S%z"
)
start_date = datetime.strptime(alternate_name_info["startDate"], "%Y-%m-%dT%H:%M:%S%z")
if alternate_name_identifier != le.identifier:
le_alternate_name = LegalEntity(
_entity_type=alternate_name_info["entityType"],
Expand Down
1 change: 0 additions & 1 deletion legal-api/tests/unit/resources/v2/test_business.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,6 @@ def test_get_business_with_alternate_names(session, client, jwt):
assert len(rv.json["business"]["alternateNames"]) == 2



@pytest.mark.parametrize(
"test_name, legal_type, owner_legal_type, identifier, owner_identifier, has_missing_business_info,"
+ "missing_business_info_warning_expected",
Expand Down
3 changes: 2 additions & 1 deletion legal-api/tests/unit/resources/v2/test_business_aliases.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,8 @@ def test_get_business_alias_by_type(session, client, jwt):

# test
rv = client.get(
f"/api/v2/businesses/{identifier}/aliases?type=translation", headers=create_header(jwt, [STAFF_ROLE], identifier)
f"/api/v2/businesses/{identifier}/aliases?type=translation",
headers=create_header(jwt, [STAFF_ROLE], identifier),
)
# check
assert rv.status_code == HTTPStatus.OK
Expand Down

0 comments on commit ea28328

Please sign in to comment.