Merge "Use six.moves cStringIO instead of cStringIO"

This commit is contained in:
Jenkins 2014-02-17 12:20:05 +00:00 committed by Gerrit Code Review
commit 92e3e3ce74

View File

@ -15,9 +15,9 @@
import requests import requests
from requests import exceptions from requests import exceptions
import cStringIO
from oslo.config import cfg from oslo.config import cfg
from six.moves import cStringIO
from heat.common import urlfetch from heat.common import urlfetch
from heat.tests.common import HeatTestCase from heat.tests.common import HeatTestCase
@ -53,7 +53,7 @@ class UrlFetchTest(HeatTestCase):
url = 'file:///etc/profile' url = 'file:///etc/profile'
self.m.StubOutWithMock(urlutils, 'urlopen') self.m.StubOutWithMock(urlutils, 'urlopen')
urlutils.urlopen(url).AndReturn(cStringIO.StringIO(data)) urlutils.urlopen(url).AndReturn(cStringIO(data))
self.m.ReplayAll() self.m.ReplayAll()
self.assertEqual(data, urlfetch.get(url, allowed_schemes=['file'])) self.assertEqual(data, urlfetch.get(url, allowed_schemes=['file']))