Skip to content

Commit

Permalink
Merge branch 'main' into 4845-pray-and-pay-revisions
Browse files Browse the repository at this point in the history
  • Loading branch information
v-anne authored Jan 8, 2025
2 parents 9f663a3 + da9ad51 commit 64082e0
Show file tree
Hide file tree
Showing 21 changed files with 1,798 additions and 340 deletions.
3 changes: 2 additions & 1 deletion cl/alerts/tests/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -2392,7 +2392,7 @@ def test_es_alert_update_and_delete(self, mock_abort_audio):
user=self.user_profile.user,
rate=Alert.REAL_TIME,
name="Test Alert OA",
query="type=oa&docket_number=19-1010",
query="type=oa&docket_number=19-1010&order_by=score desc",
alert_type=SEARCH_TYPES.ORAL_ARGUMENT,
)

Expand All @@ -2402,6 +2402,7 @@ def test_es_alert_update_and_delete(self, mock_abort_audio):
response_str = str(doc.to_dict())
self.assertIn("'query': '19-1010'", response_str)
self.assertIn("'rate': 'rt'", response_str)
self.assertNotIn("function_score", response_str)

# Update Alert
search_alert_1.query = "type=oa&docket_number=19-1020"
Expand Down
8 changes: 7 additions & 1 deletion cl/alerts/tests/tests_recap_alerts.py
Original file line number Diff line number Diff line change
Expand Up @@ -2221,13 +2221,19 @@ def test_index_and_delete_recap_alerts_from_percolator(
user=self.user_profile.user,
rate=Alert.WEEKLY,
name="Test Alert Docket Only",
query='q="401 Civil"&type=r',
query='q="401 Civil"&type=r&order_by=score desc',
alert_type=SEARCH_TYPES.RECAP,
)
self.assertTrue(
RECAPPercolator.exists(id=docket_only_alert.pk),
msg=f"Alert id: {docket_only_alert.pk} was not indexed.",
)
alert_doc = RECAPPercolator.get(id=docket_only_alert.pk)
response_str = str(alert_doc.to_dict())
self.assertIn("401 Civil", response_str)
self.assertIn("'rate': 'wly'", response_str)
# function_score breaks percolator queries. Ensure it is never indexed.
self.assertNotIn("function_score", response_str)

docket_only_alert_id = docket_only_alert.pk
# Remove the alert.
Expand Down
Loading

0 comments on commit 64082e0

Please sign in to comment.