bpo-40275: Use new test.support helper submodules in tests (GH-21317)

diff --git a/Lib/test/test_imaplib.py b/Lib/test/test_imaplib.py
index b8ab677..96bcb09 100644
--- a/Lib/test/test_imaplib.py
+++ b/Lib/test/test_imaplib.py
@@ -14,6 +14,7 @@
                           run_with_tz, run_with_locale, cpython_only)
 from test.support import hashlib_helper
 from test.support import threading_helper
+from test.support import warnings_helper
 import unittest
 from unittest import mock
 from datetime import datetime, timezone, timedelta
@@ -575,7 +576,7 @@
     # to CPython stdlib
     @cpython_only
     def test_certfile_arg_warn(self):
-        with support.check_warnings(('', DeprecationWarning)):
+        with warnings_helper.check_warnings(('', DeprecationWarning)):
             with mock.patch.object(self.imap_class, 'open'):
                 with mock.patch.object(self.imap_class, '_connect'):
                     self.imap_class('localhost', 143, certfile=CERTFILE)