diff options
author | Hai Shi <shihai1992@gmail.com> | 2020-06-25 12:15:40 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-25 12:15:40 (GMT) |
commit | 06a40d735939fd7d5cb77a68a6e18299b6484fa5 (patch) | |
tree | 1d830596f995942fb2b6088002cab6ebcb0aee0d /Lib/test/test_xmlrpc.py | |
parent | 91698d8caa4b5bb6e8dbb64b156e8afe9e32cac1 (diff) | |
download | cpython-06a40d735939fd7d5cb77a68a6e18299b6484fa5.zip cpython-06a40d735939fd7d5cb77a68a6e18299b6484fa5.tar.gz cpython-06a40d735939fd7d5cb77a68a6e18299b6484fa5.tar.bz2 |
bpo-40275: Use new test.support helper submodules in tests (GH-20824)
Diffstat (limited to 'Lib/test/test_xmlrpc.py')
-rw-r--r-- | Lib/test/test_xmlrpc.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/test/test_xmlrpc.py b/Lib/test/test_xmlrpc.py index 79f702d..3dfa84b 100644 --- a/Lib/test/test_xmlrpc.py +++ b/Lib/test/test_xmlrpc.py @@ -15,6 +15,7 @@ import re import io import contextlib from test import support +from test.support import os_helper from test.support import socket_helper from test.support import threading_helper from test.support import ALWAYS_EQ, LARGEST, SMALLEST @@ -1372,7 +1373,7 @@ class CGIHandlerTestCase(unittest.TestCase): self.cgi = None def test_cgi_get(self): - with support.EnvironmentVarGuard() as env: + with os_helper.EnvironmentVarGuard() as env: env['REQUEST_METHOD'] = 'GET' # if the method is GET and no request_text is given, it runs handle_get # get sysout output @@ -1404,7 +1405,7 @@ class CGIHandlerTestCase(unittest.TestCase): </methodCall> """ - with support.EnvironmentVarGuard() as env, \ + with os_helper.EnvironmentVarGuard() as env, \ captured_stdout(encoding=self.cgi.encoding) as data_out, \ support.captured_stdin() as data_in: data_in.write(data) |