Support Python 3

This patch fixes an issue similar to one fixed by
fa4ef4dc00 and adds the required trove
classifiers to setup.cfg.

Change-Id: Ia77e943612de9aea78128b142981e70665714e1b
This commit is contained in:
Cyril Roelandt 2014-04-03 21:32:24 +02:00
parent 871ea45447
commit 2f07742f1d
2 changed files with 8 additions and 6 deletions

View File

@ -578,7 +578,7 @@ outputs:\n\
class TestTemplateTypeFunctions(testtools.TestCase):
hot_template = '''heat_template_version: 2013-05-23
hot_template = b'''heat_template_version: 2013-05-23
parameters:
param1:
type: string
@ -606,21 +606,21 @@ resources:
tmpl_file = '/home/my/dir/template.yaml'
url = 'file:///home/my/dir/template.yaml'
request.urlopen(url).AndReturn(
six.StringIO(self.hot_template))
six.BytesIO(self.hot_template))
request.urlopen(
'file:///home/my/dir/foo.yaml').InAnyOrder().AndReturn(
six.StringIO('foo contents'))
six.BytesIO(b'foo contents'))
request.urlopen(
'file:///home/my/dir/spam/egg.yaml').InAnyOrder().AndReturn(
six.StringIO('egg contents'))
six.BytesIO(b'egg contents'))
self.m.ReplayAll()
files, tmpl_parsed = template_utils.get_template_contents(
template_file=tmpl_file)
self.assertEqual({
u'file:///home/my/dir/foo.yaml': 'foo contents',
u'file:///home/my/dir/spam/egg.yaml': 'egg contents'
u'file:///home/my/dir/foo.yaml': b'foo contents',
u'file:///home/my/dir/spam/egg.yaml': b'egg contents'
}, files)
self.assertEqual({
u'heat_template_version': u'2013-05-23',

View File

@ -16,6 +16,8 @@ classifier =
Programming Language :: Python :: 2
Programming Language :: Python :: 2.7
Programming Language :: Python :: 2.6
Programming Language :: Python :: 3
Programming Language :: Python :: 3.3
[files]
packages =