From 45ebce43cb18772d5415543a8e9927eb1dc89d4b Mon Sep 17 00:00:00 2001
From: Lu lei <lei.lu@easystack.cn>
Date: Thu, 11 Aug 2016 16:38:08 +0800
Subject: [PATCH] Fix cString ImportError for py34

Here cString dose not exist in py3.x. This patch is used to
fix py34 gate errors.

Partial-Bug: #1612071

Change-Id: I0a36777cba8c4602c16be771956d4cd26f7e979f
---
 tackerclient/tests/unit/test_cli10.py | 3 +--
 tackerclient/tests/unit/test_shell.py | 6 +++---
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/tackerclient/tests/unit/test_cli10.py b/tackerclient/tests/unit/test_cli10.py
index 9bf99aa1..694bb9c3 100644
--- a/tackerclient/tests/unit/test_cli10.py
+++ b/tackerclient/tests/unit/test_cli10.py
@@ -17,7 +17,6 @@
 import urllib
 
 import contextlib
-import cStringIO
 import fixtures
 import mox
 import six
@@ -38,7 +37,7 @@ ENDURL = 'localurl'
 
 @contextlib.contextmanager
 def capture_std_streams():
-    fake_stdout, fake_stderr = cStringIO.StringIO(), cStringIO.StringIO()
+    fake_stdout, fake_stderr = six.StringIO(), six.StringIO()
     stdout, stderr = sys.stdout, sys.stderr
     try:
         sys.stdout, sys.stderr = fake_stdout, fake_stderr
diff --git a/tackerclient/tests/unit/test_shell.py b/tackerclient/tests/unit/test_shell.py
index 6314afbb..9cb8b4e2 100644
--- a/tackerclient/tests/unit/test_shell.py
+++ b/tackerclient/tests/unit/test_shell.py
@@ -14,10 +14,10 @@
 #    under the License.
 
 import argparse
-import cStringIO
 import logging
 import os
 import re
+import six
 import sys
 
 import fixtures
@@ -61,8 +61,8 @@ class ShellTest(testtools.TestCase):
         clean_env = {}
         _old_env, os.environ = os.environ, clean_env.copy()
         try:
-            sys.stdout = cStringIO.StringIO()
-            sys.stderr = cStringIO.StringIO()
+            sys.stdout = six.StringIO()
+            sys.stderr = six.StringIO()
             _shell = openstack_shell.TackerShell('1.0')
             _shell.run(argstr.split())
         except SystemExit: