From 6274d18c39225445de6eea9372b4db19592d032d Mon Sep 17 00:00:00 2001 From: Noy Arie Date: Tue, 29 Aug 2023 14:42:26 +0300 Subject: [PATCH] fix tests --- tests/mocks/fetchers/alerts_fetcher_mock.py | 5 +++++ .../monitor/alerts/group_alerts_by_table/mock_classes.py | 1 + 2 files changed, 6 insertions(+) diff --git a/tests/mocks/fetchers/alerts_fetcher_mock.py b/tests/mocks/fetchers/alerts_fetcher_mock.py index 60c77fd8f..ab5704115 100644 --- a/tests/mocks/fetchers/alerts_fetcher_mock.py +++ b/tests/mocks/fetchers/alerts_fetcher_mock.py @@ -52,6 +52,7 @@ def query_pending_test_alerts(self, *args, **kwargs): suppression_status="pending", sent_at=None, test_created_at="2022-10-09 10:10:10", + elementary_unique_id="elementary.model_id_1.test_id_1.9cf2f5f6ad.None.generic", ), # Alert after suppression interval dict( @@ -82,6 +83,7 @@ def query_pending_test_alerts(self, *args, **kwargs): suppression_status="pending", sent_at=None, test_created_at="2022-10-09 10:10:10", + elementary_unique_id="elementary.model_id_1.test_id_4.9cf2f5f6ad.None.generic", ), # Alert without suppression interval dict( @@ -112,6 +114,7 @@ def query_pending_test_alerts(self, *args, **kwargs): suppression_status="pending", sent_at=None, test_created_at="2022-10-09 10:10:10", + elementary_unique_id="elementary.model_id_1.test_id_2.9cf2f5f6ad.None.generic", ), # First occurrence alert with suppression interval dict( @@ -142,6 +145,7 @@ def query_pending_test_alerts(self, *args, **kwargs): suppression_status="pending", sent_at=None, test_created_at="2022-10-09 10:10:10", + elementary_unique_id="elementary.model_id_1.test_id_3.9cf2f5f6ad.None.generic", ), # Duplicated alert that should be deduped dict( @@ -174,6 +178,7 @@ def query_pending_test_alerts(self, *args, **kwargs): suppression_status="pending", sent_at=None, test_created_at="2022-10-09 10:10:10", + elementary_unique_id="elementary.model_id_1.test_id_5.9cf2f5f6ad.None.generic", ), ] diff --git a/tests/unit/monitor/alerts/group_alerts_by_table/mock_classes.py b/tests/unit/monitor/alerts/group_alerts_by_table/mock_classes.py index d1b6fd278..9ab5c9105 100644 --- a/tests/unit/monitor/alerts/group_alerts_by_table/mock_classes.py +++ b/tests/unit/monitor/alerts/group_alerts_by_table/mock_classes.py @@ -14,6 +14,7 @@ class MockAlert: owners: Optional[List[str]] subscribers: Optional[List[str]] tags: Optional[List[str]] + report_url: Optional[str] database_name: str = "elementary_test_db" schema_name: str = "master_elementary" concise_name: str = "Alert"