mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Use six.Stringio instead of StringIO.StringIO
The StringIO class was moved to the io module. (In Python 2, io.StringIO is available, but is Unicode-only.) Reviewed-By: David Kupka <dkupka@redhat.com> Reviewed-By: Jan Cholasta <jcholast@redhat.com> Reviewed-By: Martin Basti <mbasti@redhat.com>
This commit is contained in:
committed by
Jan Cholasta
parent
026b1b5307
commit
65e3b9edc6
@@ -19,10 +19,10 @@
|
||||
|
||||
import sys
|
||||
import contextlib
|
||||
import StringIO
|
||||
|
||||
from nose.tools import assert_raises # pylint: disable=E0611
|
||||
import six
|
||||
from six import StringIO
|
||||
|
||||
from ipalib import api, errors
|
||||
from ipalib.plugins.user import user_add
|
||||
@@ -45,8 +45,8 @@ class CLITestContext(object):
|
||||
|
||||
def __enter__(self):
|
||||
self.old_streams = sys.stdout, sys.stderr
|
||||
self.stdout_fileobj = sys.stdout = StringIO.StringIO()
|
||||
self.stderr_fileobj = sys.stderr = StringIO.StringIO()
|
||||
self.stdout_fileobj = sys.stdout = StringIO()
|
||||
self.stderr_fileobj = sys.stderr = StringIO()
|
||||
return self
|
||||
|
||||
def __exit__(self, exc_type, exc_value, traceback):
|
||||
|
||||
Reference in New Issue
Block a user