mirror of
https://github.com/apache/superset.git
synced 2026-04-19 16:14:52 +00:00
chore: enable lint PT009 'use regular assert over self.assert.*' (#30521)
This commit is contained in:
committed by
GitHub
parent
1f013055d2
commit
a849c29288
@@ -222,7 +222,7 @@ class TestEmailSmtp(SupersetTestCase):
|
||||
app.config["SMTP_HOST"], app.config["SMTP_PORT"], context=mock.ANY
|
||||
)
|
||||
called_context = mock_smtp_ssl.call_args.kwargs["context"]
|
||||
self.assertEqual(called_context.verify_mode, ssl.CERT_REQUIRED)
|
||||
assert called_context.verify_mode == ssl.CERT_REQUIRED
|
||||
|
||||
@mock.patch("smtplib.SMTP")
|
||||
def test_send_mime_tls_server_auth(self, mock_smtp):
|
||||
@@ -233,7 +233,7 @@ class TestEmailSmtp(SupersetTestCase):
|
||||
utils.send_mime_email("from", "to", MIMEMultipart(), app.config, dryrun=False)
|
||||
mock_smtp.return_value.starttls.assert_called_with(context=mock.ANY)
|
||||
called_context = mock_smtp.return_value.starttls.call_args.kwargs["context"]
|
||||
self.assertEqual(called_context.verify_mode, ssl.CERT_REQUIRED)
|
||||
assert called_context.verify_mode == ssl.CERT_REQUIRED
|
||||
|
||||
@mock.patch("smtplib.SMTP_SSL")
|
||||
@mock.patch("smtplib.SMTP")
|
||||
|
||||
Reference in New Issue
Block a user