mirror of
https://github.com/django/django.git
synced 2025-10-30 00:56:09 +00:00
[1.10.x] Fixed #26747 -- Used more specific assertions in the Django test suite.
Backport of 4f336f6652 from master
This commit is contained in:
@@ -1228,7 +1228,7 @@ class SMTPBackendTests(BaseEmailBackendTests, SMTPBackendTestsBase):
|
||||
|
||||
def test_email_ssl_certfile_default_disabled(self):
|
||||
backend = smtp.EmailBackend()
|
||||
self.assertEqual(backend.ssl_certfile, None)
|
||||
self.assertIsNone(backend.ssl_certfile)
|
||||
|
||||
@override_settings(EMAIL_SSL_KEYFILE='foo')
|
||||
def test_email_ssl_keyfile_use_settings(self):
|
||||
@@ -1242,7 +1242,7 @@ class SMTPBackendTests(BaseEmailBackendTests, SMTPBackendTestsBase):
|
||||
|
||||
def test_email_ssl_keyfile_default_disabled(self):
|
||||
backend = smtp.EmailBackend()
|
||||
self.assertEqual(backend.ssl_keyfile, None)
|
||||
self.assertIsNone(backend.ssl_keyfile)
|
||||
|
||||
@override_settings(EMAIL_USE_TLS=True)
|
||||
def test_email_tls_attempts_starttls(self):
|
||||
@@ -1267,7 +1267,7 @@ class SMTPBackendTests(BaseEmailBackendTests, SMTPBackendTestsBase):
|
||||
def test_connection_timeout_default(self):
|
||||
"""Test that the connection's timeout value is None by default."""
|
||||
connection = mail.get_connection('django.core.mail.backends.smtp.EmailBackend')
|
||||
self.assertEqual(connection.timeout, None)
|
||||
self.assertIsNone(connection.timeout)
|
||||
|
||||
def test_connection_timeout_custom(self):
|
||||
"""Test that the timeout parameter can be customized."""
|
||||
|
||||
Reference in New Issue
Block a user