Skip to content

Commit

Permalink
[#2260] PR feedback: use statustekst instead of omschrijving in tests…
Browse files Browse the repository at this point in the history
…, add default value
  • Loading branch information
Bart van der Schoor committed Apr 19, 2024
1 parent 7e0c5a5 commit f5151ac
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion src/open_inwoner/openzaak/api_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
from datetime import date, datetime
from typing import Optional, Union

from django.utils.translation import gettext as _

from dateutil.relativedelta import relativedelta
from zgw_consumers.api_models.base import Model, ZGWModel
from zgw_consumers.api_models.constants import RolOmschrijving, RolTypes
Expand Down Expand Up @@ -87,7 +89,7 @@ def process_data(self) -> dict:
),
default="",
)
status_text = result_text or status_text
status_text = result_text or status_text or _("No data available")

return {
"identification": self.identification,
Expand Down
2 changes: 1 addition & 1 deletion src/open_inwoner/openzaak/tests/test_notification_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def __init__(self):
informeren=True,
volgnummer=2,
omschrijving="final",
statustekst="",
statustekst="status_type_final_statustekst",
isEindStatus=True,
)
self.zaak = generate_oas_component_cached(
Expand Down
2 changes: 1 addition & 1 deletion src/open_inwoner/openzaak/tests/test_notification_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def test_send_case_update_email(self):
body_html = email.alternatives[0][0]
self.assertIn(case.identificatie, body_html)
self.assertIn(case.zaaktype.omschrijving, body_html)
self.assertIn(status.statustype.omschrijving, body_html)
self.assertIn(status.statustype.statustekst, body_html)
self.assertIn(case_url, body_html)
self.assertIn(config.name, body_html)

Expand Down
2 changes: 1 addition & 1 deletion src/open_inwoner/userfeed/tests/hooks/test_case_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def test_status_update(self, mock_get_active_app_names: Mock):
strip_tags(item.message),
escape(
_("Case status has been changed to '{status}'").format(
status=status2.statustype.omschrijving
status=status2.statustype.statustekst
)
),
)
Expand Down

0 comments on commit f5151ac

Please sign in to comment.