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

diff --git a/Lib/test/test_mailcap.py b/Lib/test/test_mailcap.py
index c08423c..51a0c7d 100644
--- a/Lib/test/test_mailcap.py
+++ b/Lib/test/test_mailcap.py
@@ -2,6 +2,7 @@
 import os
 import copy
 import test.support
+from test.support import os_helper
 import unittest
 
 # Location of mailcap file
@@ -74,7 +75,7 @@
         self.assertIsInstance(mcfiles, list)
         for m in mcfiles:
             self.assertIsInstance(m, str)
-        with test.support.EnvironmentVarGuard() as env:
+        with os_helper.EnvironmentVarGuard() as env:
             # According to RFC 1524, if MAILCAPS env variable exists, use that
             # and only that.
             if "MAILCAPS" in env:
@@ -136,7 +137,7 @@
         # Test mailcap.getcaps() using mock mailcap file in this dir.
         # Temporarily override any existing system mailcap file by pointing the
         # MAILCAPS environment variable to our mock file.
-        with test.support.EnvironmentVarGuard() as env:
+        with os_helper.EnvironmentVarGuard() as env:
             env["MAILCAPS"] = MAILCAPFILE
             caps = mailcap.getcaps()
             self.assertDictEqual(caps, MAILCAPDICT)