diff options
author | Claude Paroz <claude@2xlibre.net> | 2013-10-25 11:19:41 +0200 |
---|---|---|
committer | Claude Paroz <claude@2xlibre.net> | 2013-10-25 11:23:19 +0200 |
commit | 3afde36d03e2b3b5ff5a265af39d8fb27afa8959 (patch) | |
tree | 884be8c3be161eae83ddc506228def33d91c934b /tests | |
parent | 43cfc652d250ba6bc746f22ce429d6e0a7e60103 (diff) | |
download | django-3afde36d03e2b3b5ff5a265af39d8fb27afa8959.tar.gz |
Undelete the login() call inadvertantly removed in 4e0a2fe59c
Refs #21271.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/mail/tests.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/mail/tests.py b/tests/mail/tests.py index a380ecf3d7..4fcea7b8ca 100644 --- a/tests/mail/tests.py +++ b/tests/mail/tests.py @@ -880,6 +880,16 @@ class SMTPBackendTests(BaseEmailBackendTests, SimpleTestCase): self.assertEqual(backend.username, '') self.assertEqual(backend.password, '') + def test_auth_attempted(self): + """ + Test that opening the backend with non empty username/password tries + to authenticate against the SMTP server. + """ + backend = smtp.EmailBackend( + username='not empty username', password='not empty password') + self.assertRaisesMessage(SMTPException, + 'SMTP AUTH extension not supported by server.', backend.open) + def test_server_stopped(self): """ Test that closing the backend while the SMTP server is stopped doesn't |