-
Notifications
You must be signed in to change notification settings - Fork 254
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support for aligning Slack message grouping intervals
- Loading branch information
Robert Szefler
committed
Jun 25, 2024
1 parent
50f7f84
commit d0856f1
Showing
4 changed files
with
82 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import pytest | ||
|
||
from datetime import datetime | ||
|
||
from robusta.core.sinks.sink_base import NotificationSummary | ||
|
||
|
||
class TestNotificationSummary: | ||
@pytest.mark.parametrize("input_dt,expected_output", [ | ||
(datetime(2024, 6, 25, 12, 15, 33), (1719266400, 1719352800)), | ||
(datetime(2024, 6, 30, 17, 22, 19), (1719698400, 1719784800)), | ||
(datetime(2024, 12, 3, 10, 59, 59), (1733180400, 1733266800)), | ||
(datetime(2024, 12, 31, 16, 42, 28), (1735599600, 1735686000)), | ||
]) | ||
def test_get_day_boundaries(self, input_dt, expected_output): | ||
assert NotificationSummary.get_day_boundaries(input_dt) == expected_output |