Skip to content

Commit

Permalink
💚 Fix broken assertion in test
Browse files Browse the repository at this point in the history
Jan 1st + 1 month equals Feb. 1st, not Jan 31st. Why was this test passing then, you ask?
Well, the PDF also includes the timestamp when it was generated, based on 'now'. The
PR with the fix (and test) was created on Jan 31st, effectively causing the expected
string to be present in the PDF. Until, of course, time passed and it became
February.
  • Loading branch information
sergei-maertens committed Feb 3, 2025
1 parent 1625baf commit 3f79ba2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/openforms/submissions/tests/test_tasks_pdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def test_date_object_is_converted_to_str_when_it_comes_from_logic_rule(self):

html = submission.report.generate_submission_report_pdf()

self.assertIn("31 januari 2025", html)
self.assertIn("1 februari 2025", html)

def test_visible_output_included(self):
"""
Expand Down

0 comments on commit 3f79ba2

Please sign in to comment.