summaryrefslogtreecommitdiff
path: root/tests/mail
diff options
context:
space:
mode:
authorJon Dufresne <jon.dufresne@gmail.com>2019-01-28 07:01:35 -0800
committerTim Graham <timograham@gmail.com>2019-01-28 11:15:06 -0500
commit7785e03ba89aafbd949191f126361fb9103cb980 (patch)
tree5776f7063604285445cfcebf6efb42fd5d063f60 /tests/mail
parent7444f3252757ed4384623e5afd7dcfeef3e0c74e (diff)
downloaddjango-7785e03ba89aafbd949191f126361fb9103cb980.tar.gz
Fixed #30137 -- Replaced OSError aliases with the canonical OSError.
Used more specific errors (e.g. FileExistsError) as appropriate.
Diffstat (limited to 'tests/mail')
-rw-r--r--tests/mail/tests.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/mail/tests.py b/tests/mail/tests.py
index f06e053074..e283101b79 100644
--- a/tests/mail/tests.py
+++ b/tests/mail/tests.py
@@ -4,7 +4,6 @@ import mimetypes
import os
import shutil
import smtpd
-import socket
import sys
import tempfile
import threading
@@ -1570,7 +1569,7 @@ class SMTPBackendStoppedServerTests(SMTPBackendTestsBase):
"""
A socket connection error is silenced with fail_silently=True.
"""
- with self.assertRaises(socket.error):
+ with self.assertRaises(ConnectionError):
self.backend.open()
self.backend.fail_silently = True
self.backend.open()