summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_smtpd.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_smtpd.py')
-rw-r--r--Lib/test/test_smtpd.py45
1 files changed, 23 insertions, 22 deletions
diff --git a/Lib/test/test_smtpd.py b/Lib/test/test_smtpd.py
index 3be7739..d5d5abf 100644
--- a/Lib/test/test_smtpd.py
+++ b/Lib/test/test_smtpd.py
@@ -2,6 +2,7 @@ import unittest
import textwrap
from test import support, mock_socket
from test.support import socket_helper
+from test.support import warnings_helper
import socket
import io
import smtpd
@@ -714,49 +715,49 @@ class SMTPDChannelTest(unittest.TestCase):
b'recognized\r\n')
def test_attribute_deprecations(self):
- with support.check_warnings(('', DeprecationWarning)):
+ with warnings_helper.check_warnings(('', DeprecationWarning)):
spam = self.channel._SMTPChannel__server
- with support.check_warnings(('', DeprecationWarning)):
+ with warnings_helper.check_warnings(('', DeprecationWarning)):
self.channel._SMTPChannel__server = 'spam'
- with support.check_warnings(('', DeprecationWarning)):
+ with warnings_helper.check_warnings(('', DeprecationWarning)):
spam = self.channel._SMTPChannel__line
- with support.check_warnings(('', DeprecationWarning)):
+ with warnings_helper.check_warnings(('', DeprecationWarning)):
self.channel._SMTPChannel__line = 'spam'
- with support.check_warnings(('', DeprecationWarning)):
+ with warnings_helper.check_warnings(('', DeprecationWarning)):
spam = self.channel._SMTPChannel__state
- with support.check_warnings(('', DeprecationWarning)):
+ with warnings_helper.check_warnings(('', DeprecationWarning)):
self.channel._SMTPChannel__state = 'spam'
- with support.check_warnings(('', DeprecationWarning)):
+ with warnings_helper.check_warnings(('', DeprecationWarning)):
spam = self.channel._SMTPChannel__greeting
- with support.check_warnings(('', DeprecationWarning)):
+ with warnings_helper.check_warnings(('', DeprecationWarning)):
self.channel._SMTPChannel__greeting = 'spam'
- with support.check_warnings(('', DeprecationWarning)):
+ with warnings_helper.check_warnings(('', DeprecationWarning)):
spam = self.channel._SMTPChannel__mailfrom
- with support.check_warnings(('', DeprecationWarning)):
+ with warnings_helper.check_warnings(('', DeprecationWarning)):
self.channel._SMTPChannel__mailfrom = 'spam'
- with support.check_warnings(('', DeprecationWarning)):
+ with warnings_helper.check_warnings(('', DeprecationWarning)):
spam = self.channel._SMTPChannel__rcpttos
- with support.check_warnings(('', DeprecationWarning)):
+ with warnings_helper.check_warnings(('', DeprecationWarning)):
self.channel._SMTPChannel__rcpttos = 'spam'
- with support.check_warnings(('', DeprecationWarning)):
+ with warnings_helper.check_warnings(('', DeprecationWarning)):
spam = self.channel._SMTPChannel__data
- with support.check_warnings(('', DeprecationWarning)):
+ with warnings_helper.check_warnings(('', DeprecationWarning)):
self.channel._SMTPChannel__data = 'spam'
- with support.check_warnings(('', DeprecationWarning)):
+ with warnings_helper.check_warnings(('', DeprecationWarning)):
spam = self.channel._SMTPChannel__fqdn
- with support.check_warnings(('', DeprecationWarning)):
+ with warnings_helper.check_warnings(('', DeprecationWarning)):
self.channel._SMTPChannel__fqdn = 'spam'
- with support.check_warnings(('', DeprecationWarning)):
+ with warnings_helper.check_warnings(('', DeprecationWarning)):
spam = self.channel._SMTPChannel__peer
- with support.check_warnings(('', DeprecationWarning)):
+ with warnings_helper.check_warnings(('', DeprecationWarning)):
self.channel._SMTPChannel__peer = 'spam'
- with support.check_warnings(('', DeprecationWarning)):
+ with warnings_helper.check_warnings(('', DeprecationWarning)):
spam = self.channel._SMTPChannel__conn
- with support.check_warnings(('', DeprecationWarning)):
+ with warnings_helper.check_warnings(('', DeprecationWarning)):
self.channel._SMTPChannel__conn = 'spam'
- with support.check_warnings(('', DeprecationWarning)):
+ with warnings_helper.check_warnings(('', DeprecationWarning)):
spam = self.channel._SMTPChannel__addr
- with support.check_warnings(('', DeprecationWarning)):
+ with warnings_helper.check_warnings(('', DeprecationWarning)):
self.channel._SMTPChannel__addr = 'spam'
@unittest.skipUnless(socket_helper.IPV6_ENABLED, "IPv6 not enabled")