Add test for when there are no notifications on a certificate (#757)
This commit is contained in:
parent
f90076abe9
commit
1c295896e6
|
@ -74,6 +74,15 @@ def test_send_expiration_notification(certificate, notification, notification_pl
|
||||||
assert send_expiration_notifications([]) == (2, 0)
|
assert send_expiration_notifications([]) == (2, 0)
|
||||||
|
|
||||||
|
|
||||||
|
@mock_ses
|
||||||
|
def test_send_expiration_notification_with_no_notifications(certificate, notification, notification_plugin):
|
||||||
|
from lemur.notifications.messaging import send_expiration_notifications
|
||||||
|
|
||||||
|
delta = certificate.not_after - timedelta(days=10)
|
||||||
|
with freeze_time(delta.datetime):
|
||||||
|
assert send_expiration_notifications([]) == (0, 0)
|
||||||
|
|
||||||
|
|
||||||
@mock_ses
|
@mock_ses
|
||||||
def test_send_rotation_notification(notification_plugin, certificate):
|
def test_send_rotation_notification(notification_plugin, certificate):
|
||||||
from lemur.notifications.messaging import send_rotation_notification
|
from lemur.notifications.messaging import send_rotation_notification
|
||||||
|
|
Loading…
Reference in New Issue