From ef9fc4cd9224d204476f1de01b7b2693d6712940 Mon Sep 17 00:00:00 2001 From: Zane Bitter Date: Fri, 29 Aug 2014 14:10:30 -0400 Subject: [PATCH] Get rid of old-style classes A Hacking rule is on the way. Change-Id: If254c86649d7deadfb47f7dba31dd1adf7cf7fa0 --- heat/engine/clients/client_plugin.py | 2 +- heat/tests/common.py | 2 +- heat/tests/test_api_cfn_v1.py | 2 +- heat/tests/test_api_cloudwatch.py | 2 +- heat/tests/test_api_openstack_v1.py | 8 ++++---- heat/tests/test_instance.py | 4 ++-- heat/tests/test_server.py | 4 ++-- heat/tests/test_sqlalchemy_api.py | 2 +- heat/tests/test_urlfetch.py | 2 +- 9 files changed, 14 insertions(+), 14 deletions(-) diff --git a/heat/engine/clients/client_plugin.py b/heat/engine/clients/client_plugin.py index b2eb90ed1..5f3520083 100644 --- a/heat/engine/clients/client_plugin.py +++ b/heat/engine/clients/client_plugin.py @@ -17,7 +17,7 @@ import six @six.add_metaclass(abc.ABCMeta) -class ClientPlugin(): +class ClientPlugin(object): # Module which contains all exceptions classes which the client # may emit diff --git a/heat/tests/common.py b/heat/tests/common.py index a375b000a..3be244367 100644 --- a/heat/tests/common.py +++ b/heat/tests/common.py @@ -38,7 +38,7 @@ from heat.tests import utils TEST_DEFAULT_LOGLEVELS = {'migrate': logging.WARN} -class FakeLogMixin: +class FakeLogMixin(object): def setup_logging(self): # Assign default logs to self.LOG so we can still # assert on heat logs. diff --git a/heat/tests/test_api_cfn_v1.py b/heat/tests/test_api_cfn_v1.py index d26c4443b..4a6fdf9c5 100644 --- a/heat/tests/test_api_cfn_v1.py +++ b/heat/tests/test_api_cfn_v1.py @@ -53,7 +53,7 @@ class CfnStackControllerTest(HeatTestCase): u'Foo': u'bar'} # Create WSGI controller instance - class DummyConfig(): + class DummyConfig(object): bind_port = 8000 cfgopts = DummyConfig() self.controller = stacks.StackController(options=cfgopts) diff --git a/heat/tests/test_api_cloudwatch.py b/heat/tests/test_api_cloudwatch.py index 9b7abe072..4d028fff2 100644 --- a/heat/tests/test_api_cloudwatch.py +++ b/heat/tests/test_api_cloudwatch.py @@ -503,7 +503,7 @@ class WatchControllerTest(HeatTestCase): self.api_version = '1.0' # Create WSGI controller instance - class DummyConfig(): + class DummyConfig(object): bind_port = 8003 cfgopts = DummyConfig() self.controller = watches.WatchController(options=cfgopts) diff --git a/heat/tests/test_api_openstack_v1.py b/heat/tests/test_api_openstack_v1.py index 1c5048428..4ad5fb027 100644 --- a/heat/tests/test_api_openstack_v1.py +++ b/heat/tests/test_api_openstack_v1.py @@ -320,7 +320,7 @@ class StackControllerTest(ControllerTest, HeatTestCase): super(StackControllerTest, self).setUp() # Create WSGI controller instance - class DummyConfig(): + class DummyConfig(object): bind_port = 8004 cfgopts = DummyConfig() @@ -1696,7 +1696,7 @@ class ResourceControllerTest(ControllerTest, HeatTestCase): super(ResourceControllerTest, self).setUp() # Create WSGI controller instance - class DummyConfig(): + class DummyConfig(object): bind_port = 8004 cfgopts = DummyConfig() @@ -2201,7 +2201,7 @@ class EventControllerTest(ControllerTest, HeatTestCase): super(EventControllerTest, self).setUp() # Create WSGI controller instance - class DummyConfig(): + class DummyConfig(object): bind_port = 8004 cfgopts = DummyConfig() @@ -3245,7 +3245,7 @@ class ActionControllerTest(ControllerTest, HeatTestCase): super(ActionControllerTest, self).setUp() # Create WSGI controller instance - class DummyConfig(): + class DummyConfig(object): bind_port = 8004 cfgopts = DummyConfig() diff --git a/heat/tests/test_instance.py b/heat/tests/test_instance.py index 3b5da0aed..85c172dac 100644 --- a/heat/tests/test_instance.py +++ b/heat/tests/test_instance.py @@ -435,7 +435,7 @@ class InstancesTest(HeatTestCase): exc = self.assertRaises(exception.Error, instance.handle_check) self.assertIn('foo', str(exc)) - class FakeVolumeAttach: + class FakeVolumeAttach(object): def started(self): return False @@ -633,7 +633,7 @@ class InstancesTest(HeatTestCase): self.m.VerifyAll() def create_fake_iface(self, port, net, ip): - class fake_interface(): + class fake_interface(object): def __init__(self, port_id, net_id, fixed_ip): self.port_id = port_id self.net_id = net_id diff --git a/heat/tests/test_server.py b/heat/tests/test_server.py index 47357eeda..65884f982 100644 --- a/heat/tests/test_server.py +++ b/heat/tests/test_server.py @@ -156,7 +156,7 @@ class ServersTest(HeatTestCase): return server def _create_fake_iface(self, port, mac, ip): - class fake_interface(): + class fake_interface(object): def __init__(self, port_id, mac_addr, fixed_ip): self.port_id = port_id self.mac_addr = mac_addr @@ -2151,7 +2151,7 @@ class ServersTest(HeatTestCase): return {'port': port, 'network': net, 'fixed_ip': ip, 'uuid': None} def create_fake_iface(self, port, net, ip): - class fake_interface(): + class fake_interface(object): def __init__(self, port_id, net_id, fixed_ip): self.port_id = port_id self.net_id = net_id diff --git a/heat/tests/test_sqlalchemy_api.py b/heat/tests/test_sqlalchemy_api.py index d32ce2580..b43ea2a1f 100644 --- a/heat/tests/test_sqlalchemy_api.py +++ b/heat/tests/test_sqlalchemy_api.py @@ -1448,7 +1448,7 @@ class DBAPIStackTest(HeatTestCase): stacks = [create_stack(self.ctx, templates[i], creds[i], deleted_at=deleted[i]) for i in range(5)] - class MyDatetime(): + class MyDatetime(object): def now(self): return now self.useFixture(fixtures.MonkeyPatch('heat.db.sqlalchemy.api.datetime', diff --git a/heat/tests/test_urlfetch.py b/heat/tests/test_urlfetch.py index 9f26fb98a..22eed9a87 100644 --- a/heat/tests/test_urlfetch.py +++ b/heat/tests/test_urlfetch.py @@ -22,7 +22,7 @@ from heat.common import urlfetch from heat.tests.common import HeatTestCase -class Response: +class Response(object): def __init__(self, buf=''): self.buf = buf