Skip to content

Commit f8d555c

Browse files
committed
fix(alerts): fixed a test bug
The test test_percolate_document_on_ingestion was relying on a typing bug. When creating the RECAPDocument rd_2, it was correctly setting the document_number to a string, "1". However, when it changed the value to trigger a webhook, it set the value to the integer 1. This worked because 1 != "1", even though Django converts it later to a string and the result in the database is the same.
1 parent af6f4dd commit f8d555c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cl/alerts/tests/tests_recap_alerts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3437,7 +3437,7 @@ def test_percolate_document_on_ingestion(self, mock_prefix) -> None:
34373437
),
34383438
self.captureOnCommitCallbacks(execute=True),
34393439
):
3440-
rd_2.document_number = "1"
3440+
rd_2.document_number = "2"
34413441
rd_2.save()
34423442

34433443
call_command("cl_send_rt_percolator_alerts", testing_mode=True)

0 commit comments

Comments
 (0)