summaryrefslogtreecommitdiff
path: root/ceilometerclient
diff options
context:
space:
mode:
Diffstat (limited to 'ceilometerclient')
-rw-r--r--ceilometerclient/tests/test_shell.py4
-rw-r--r--ceilometerclient/tests/test_utils.py4
-rw-r--r--ceilometerclient/tests/v2/test_shell.py4
3 files changed, 6 insertions, 6 deletions
diff --git a/ceilometerclient/tests/test_shell.py b/ceilometerclient/tests/test_shell.py
index ee09e16..7c01df5 100644
--- a/ceilometerclient/tests/test_shell.py
+++ b/ceilometerclient/tests/test_shell.py
@@ -10,9 +10,9 @@
# License for the specific language governing permissions and limitations
# under the License.
-import cStringIO
import httplib2
import re
+import six
import sys
import fixtures
@@ -48,7 +48,7 @@ class ShellTest(utils.BaseTestCase):
def shell(self, argstr):
orig = sys.stdout
try:
- sys.stdout = cStringIO.StringIO()
+ sys.stdout = six.StringIO()
_shell = ceilometer_shell.CeilometerShell()
_shell.main(argstr.split())
except SystemExit:
diff --git a/ceilometerclient/tests/test_utils.py b/ceilometerclient/tests/test_utils.py
index e0626af..30ba31c 100644
--- a/ceilometerclient/tests/test_utils.py
+++ b/ceilometerclient/tests/test_utils.py
@@ -14,7 +14,7 @@
# under the License.
-import cStringIO
+import six
import sys
from ceilometerclient.common import utils
@@ -31,7 +31,7 @@ class UtilsTest(test_utils.BaseTestCase):
# test that the prettytable output is wellformatted (left-aligned)
saved_stdout = sys.stdout
try:
- sys.stdout = output_dict = cStringIO.StringIO()
+ sys.stdout = output_dict = six.StringIO()
utils.print_dict({'K': 'k', 'Key': 'Value'})
finally:
diff --git a/ceilometerclient/tests/v2/test_shell.py b/ceilometerclient/tests/v2/test_shell.py
index 402343b..6392e44 100644
--- a/ceilometerclient/tests/v2/test_shell.py
+++ b/ceilometerclient/tests/v2/test_shell.py
@@ -10,9 +10,9 @@
# License for the specific language governing permissions and limitations
# under the License.
-import cStringIO
import mock
import re
+import six
import sys
from testtools import matchers
@@ -102,7 +102,7 @@ class ShellAlarmHistoryCommandTest(utils.BaseTestCase):
def _do_test_alarm_history(self, raw_query=None, parsed_query=None):
self.args.query = raw_query
orig = sys.stdout
- sys.stdout = cStringIO.StringIO()
+ sys.stdout = six.StringIO()
history = [alarms.AlarmChange(mock.Mock(), change)
for change in self.ALARM_HISTORY]
self.cc.alarms.get_history.return_value = history