Upgrade to hacking 0.10

Change-Id: Ia57b9acc983b783df83a59b6b74cb674089bb7ac
This commit is contained in:
Julien Danjou 2015-01-13 14:07:10 +01:00
parent a8b4b845a0
commit 4ec5f5a6c6
7 changed files with 9 additions and 8 deletions

View File

@ -18,7 +18,7 @@ from oslo_utils import timeutils
from wsme import types as wsme_types
class WSMEModelTransformer():
class WSMEModelTransformer(object):
def to_dict(self):
# Return the wsme_attributes names:values as a dict

View File

@ -143,7 +143,8 @@ class Server(object):
self.create_database()
cmd = ("%(server_module)s --config-file %(conf_file_name)s"
% self.__dict__)
% {"server_module": self.server_module,
"conf_file_name": self.conf_file_name})
cmd = "%s -m %s" % (sys.executable, cmd)
# close the sock and release the unused port closer to start time
if self.exec_env:

View File

@ -229,11 +229,11 @@ class TestUtils(test_utils.BaseTestCase):
self.assertEqual("test", result)
def test_mutating(self):
class FakeContext():
class FakeContext(object):
def __init__(self):
self.read_only = False
class Fake():
class Fake(object):
def __init__(self):
self.context = FakeContext()

View File

@ -500,7 +500,7 @@ class TestHelpers(test_utils.BaseTestCase):
'properties': {'distro': 'Ubuntu 10.04 LTS'}}
headers = utils.image_meta_to_http_headers(fixture)
class FakeResponse():
class FakeResponse(object):
pass
response = FakeResponse()

View File

@ -32,7 +32,7 @@ CONF = {'default_store': 'file',
class TestStoreLocation(base.StoreClearingUnitTest):
class FakeImageProxy():
class FakeImageProxy(object):
size = None
context = None
store_api = mock.Mock()

View File

@ -910,7 +910,7 @@ class TestRegistryV1ClientApi(base.IsolatedUnitTest):
self.assertEqual(expected, rapi._CLIENT_CREDS)
class FakeResponse():
class FakeResponse(object):
status = 202
def getheader(*args, **kwargs):

View File

@ -3,7 +3,7 @@
# process, which may cause wedges in the gate later.
# Hacking already pins down pep8, pyflakes and flake8
hacking>=0.9.2,<0.10
hacking>=0.10.0,<0.11
# For translations processing
Babel>=1.3