From 61f44d114a857b5c806167fc1a3153e6a684ab61 Mon Sep 17 00:00:00 2001 From: He Yongli Date: Mon, 17 Feb 2014 14:53:45 +0800 Subject: [PATCH] Use six.moves cStringIO instead of cStringIO to keep Python 3.x compatibility, use six.moves.cStringIO to replace StringIO Change-Id: I900d9b90665c13770ae770d53ff67c2ae3df8b9d Closes-Bug: #1280964 --- heat/tests/test_urlfetch.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/heat/tests/test_urlfetch.py b/heat/tests/test_urlfetch.py index 20557fa45..bd9e3df18 100644 --- a/heat/tests/test_urlfetch.py +++ b/heat/tests/test_urlfetch.py @@ -15,9 +15,9 @@ import requests from requests import exceptions -import cStringIO from oslo.config import cfg +from six.moves import cStringIO from heat.common import urlfetch from heat.tests.common import HeatTestCase @@ -53,7 +53,7 @@ class UrlFetchTest(HeatTestCase): url = 'file:///etc/profile' self.m.StubOutWithMock(urlutils, 'urlopen') - urlutils.urlopen(url).AndReturn(cStringIO.StringIO(data)) + urlutils.urlopen(url).AndReturn(cStringIO(data)) self.m.ReplayAll() self.assertEqual(data, urlfetch.get(url, allowed_schemes=['file']))