  from django.core.handlers.wsgi import WSGIRequest
  from django.core.servers.basehttp import WSGIRequestHandler
  from django.test import TestCase
  from django.test.client import RequestFactory
  from django.utils.six import BytesIO, StringIO
  
  
  class WSGIRequestHandlerTestCase(TestCase):
      def test_https(self):
          request = WSGIRequest(RequestFactory().get('/').environ)
 
</s> remove import sys

 </s> add  </s> remove from django.utils.six import StringIO
 </s> add  </s> remove from django.test.utils import override_settings
 </s> add from django.test.utils import captured_stdout, override_settings </s> remove from django.utils.six import StringIO
 </s> add from django.test.utils import captured_stdout
from django.test.utils import captured_stderr
from django.utils.six import BytesIO
  from django.core.handlers.wsgi import WSGIRequest
  from django.core.servers.basehttp import WSGIRequestHandler
  from django.test import TestCase
  from django.test.client import RequestFactory
from django.test.utils import captured_stderr
from django.utils.six import BytesIO
  
  
  class WSGIRequestHandlerTestCase(TestCase):
      def test_https(self):
          request = WSGIRequest(RequestFactory().get('/').environ)
keep keep keep keep replace keep keep keep keep keep
 Fixed #23930 -- Added copies of captured_std* managers from CPython's test.support.

StringIO import was adapted for compatibility with Python 2. 
tests/servers/test_basehttp.py