Skip to content

Commit

Permalink
another lint
Browse files Browse the repository at this point in the history
Signed-off-by: joseph-sentry <[email protected]>
  • Loading branch information
joseph-sentry committed Sep 29, 2023
1 parent 105ed31 commit 1e9f32a
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions services/tests/test_smtp.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import logging
from smtplib import (
SMTPAuthenticationError,
SMTPConnectError,
SMTPDataError,
SMTPNotSupportedError,
SMTPRecipientsRefused,
SMTPResponseException,
SMTPSenderRefused,
SMTPServerDisconnected,
SMTPConnectError,
)
from unittest.mock import MagicMock, call, patch

Expand Down Expand Up @@ -146,10 +146,9 @@ def test_smtp_active(self, mocker, mock_configuration, dbsession):
SMTPService.connection = None
assert smtp.active() == False

def test_smtp_disconnected(self, mocker, mock_configuration, dbsession):
mock_configuration._params["services"]["smtp"]["username"] = "test_username"
mock_configuration._params["services"]["smtp"]["password"] = "test_password"

def test_smtp_disconnected(
self, mocker, mock_configuration, dbsession, set_username_and_password
):
m = MagicMock()
m.configure_mock(**{"noop.side_effect": SMTPServerDisconnected()})
mocker.patch(
Expand Down

0 comments on commit 1e9f32a

Please sign in to comment.