From: Samuel Fekete Date: Mon, 3 Jul 2017 14:29:36 +0000 (+0100) Subject: Fix `socketserver` for Python 3 X-Git-Tag: v2.0.0~5^2~6 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=bed9e520a371a99132e05511f110a141d22d2a7f;p=vcrpy.git Fix `socketserver` for Python 3 --- diff --git a/tests/integration/test_proxy.py b/tests/integration/test_proxy.py index ce67e60..ab104b1 100644 --- a/tests/integration/test_proxy.py +++ b/tests/integration/test_proxy.py @@ -3,11 +3,10 @@ # External imports import multiprocessing -import SocketServer -import SimpleHTTPServer import pytest requests = pytest.importorskip("requests") +from six.moves import socketserver, SimpleHTTPServer from six.moves.urllib.request import urlopen # Internal imports @@ -26,7 +25,7 @@ class Proxy(SimpleHTTPServer.SimpleHTTPRequestHandler): @pytest.yield_fixture(scope='session') def proxy_server(httpbin): - httpd = SocketServer.ForkingTCPServer(('', 0), Proxy) + httpd = socketserver.ForkingTCPServer(('', 0), Proxy) proxy_process = multiprocessing.Process( target=httpd.serve_forever, )