Imported Debian patch 4.0.5-6~numeezy

This commit is contained in:
Alexandre Ellert
2016-02-17 15:07:45 +01:00
committed by Mario Fetka
parent c44de33144
commit 10dfc9587b
1203 changed files with 53869 additions and 241462 deletions

View File

@@ -19,20 +19,14 @@
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
import pytest
if six.PY3:
unicode = str
@pytest.mark.tier0
class CLITestContext(object):
"""Context manager that replaces stdout & stderr, and catches SystemExit
@@ -47,8 +41,8 @@ class CLITestContext(object):
def __enter__(self):
self.old_streams = sys.stdout, sys.stderr
self.stdout_fileobj = sys.stdout = StringIO()
self.stderr_fileobj = sys.stderr = StringIO()
self.stdout_fileobj = sys.stdout = StringIO.StringIO()
self.stderr_fileobj = sys.stderr = StringIO.StringIO()
return self
def __exit__(self, exc_type, exc_value, traceback):