  import unittest
  
  from django.apps import apps
  from django.core.management import ManagementUtility
  from django.utils.six import StringIO
  
  
  class BashCompletionTests(unittest.TestCase):
      """
      Testing the Python level bash completion code.
 
</s> remove import sys
 </s> add  </s> remove from django.utils.six import BytesIO, StringIO
 </s> add from django.test.utils import captured_stderr
from django.utils.six import BytesIO </s> remove import sys

 </s> add 
from django.test.utils import captured_stdout
  import unittest
  
  from django.apps import apps
  from django.core.management import ManagementUtility
from django.test.utils import captured_stdout
  
  
  class BashCompletionTests(unittest.TestCase):
      """
      Testing the Python level bash completion code.
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/bash_completion/tests.py