mirror of
https://github.com/kevin1024/vcrpy.git
synced 2025-12-08 16:53:23 +00:00
Fix socketserver for Python 3
This commit is contained in:
committed by
Samuel Fekete
parent
365a98bf66
commit
bed9e520a3
@@ -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,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user