Skip to content

Commit

Permalink
fix: open case title limit to 150 chars (#3292)
Browse files Browse the repository at this point in the history
  • Loading branch information
rikuke authored Sep 9, 2024
1 parent a7f2d71 commit 1bfc1b2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions backend/benefit/applications/services/ahjo_payload.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ def prepare_case_title(application: Application, company_name: str) -> str:
return full_title


def prepare_final_case_title(application: Application, limit: int = 100) -> str:
"""Prepare the final case title for Ahjo, if the full title is over 100 characters, \
def prepare_final_case_title(application: Application, limit: int = 150) -> str:
"""Prepare the final case title for Ahjo, if the full title is over 150 characters, \
truncate the company name to fit the limit."""
full_case_title = prepare_case_title(application, application.company_name)
length_of_full_title = len(full_case_title)
Expand Down
10 changes: 5 additions & 5 deletions backend/benefit/applications/tests/test_ahjo_payload.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ def test_truncate_string_to_limit(
@pytest.mark.parametrize(
"company_name, limit, expected_length",
[
("a" * 100 + "b" * 100, 100, 100),
("a" * 100 + "b" * 5, 100, 100),
("a" * 100, 100, 100),
("a" * 50, 100, 100),
("1234567890AB", 10, 100),
("a" * 100 + "b" * 100, 100, 150),
("a" * 100 + "b" * 5, 100, 150),
("a" * 100, 100, 150),
("a" * 50, 100, 150),
("1234567890AB", 10, 150),
],
)
def test_prepare_final_case_title_truncate(
Expand Down

0 comments on commit 1bfc1b2

Please sign in to comment.