summaryrefslogtreecommitdiffstats
path: root/nova/tests
diff options
context:
space:
mode:
authorMonty Taylor <mordred@inaugust.com>2011-09-22 18:22:42 -0400
committerBrian Waldon <brian.waldon@rackspace.com>2011-09-23 10:26:22 -0400
commit21dcf669c72fddc7b26018388e678fe0b033e318 (patch)
tree6bbef45d7496a628c8aecae3a5cb05acc223f8aa /nova/tests
parent37100f5653960b7f898e91663839feed51e14419 (diff)
Fix outstanding pep8 errors for a clean trunk.
Also, add an option to run_tests.sh to skip running pep8. We have a separate job in Jenkins which runs pep8, so there's no need to spin our wheels on it during the test run. Change-Id: I552330994e55a36fa96b63658493ed30e2720c85
Diffstat (limited to 'nova/tests')
-rw-r--r--nova/tests/api/openstack/test_flavors.py6
-rw-r--r--nova/tests/api/openstack/test_servers.py2
-rw-r--r--nova/tests/fake_network.py2
-rw-r--r--nova/tests/scheduler/test_scheduler.py2
-rw-r--r--nova/tests/test_libvirt.py16
5 files changed, 15 insertions, 13 deletions
diff --git a/nova/tests/api/openstack/test_flavors.py b/nova/tests/api/openstack/test_flavors.py
index 743dddfc4..77aefe507 100644
--- a/nova/tests/api/openstack/test_flavors.py
+++ b/nova/tests/api/openstack/test_flavors.py
@@ -641,7 +641,8 @@ class FlavorsXMLSerializationTest(test.TestCase):
"href": "http://localhost/fake/flavors/23",
},
],
- }, {
+ },
+ {
"id": "13",
"name": "flavor 13",
"ram": "256",
@@ -706,7 +707,8 @@ class FlavorsXMLSerializationTest(test.TestCase):
"href": "http://localhost/fake/flavors/23",
},
],
- }, {
+ },
+ {
"id": "13",
"name": "flavor 13",
"ram": "256",
diff --git a/nova/tests/api/openstack/test_servers.py b/nova/tests/api/openstack/test_servers.py
index 107e332d1..c8d62d71a 100644
--- a/nova/tests/api/openstack/test_servers.py
+++ b/nova/tests/api/openstack/test_servers.py
@@ -738,7 +738,7 @@ class ServersTest(test.TestCase):
self.assertEquals(ip.getAttribute('addr'), '1.2.3.4')
(private,) = server.getElementsByTagName('private')
(ip,) = private.getElementsByTagName('ip')
- self.assertEquals(ip.getAttribute('addr'), '192.168.0.3')
+ self.assertEquals(ip.getAttribute('addr'), '192.168.0.3')
def test_get_server_by_id_with_addresses(self):
private = "192.168.0.3"
diff --git a/nova/tests/fake_network.py b/nova/tests/fake_network.py
index febac5e09..35d0811ef 100644
--- a/nova/tests/fake_network.py
+++ b/nova/tests/fake_network.py
@@ -72,7 +72,7 @@ class FakeNetworkManager(network_manager.NetworkManager):
class FakeDB:
def fixed_ip_get_by_instance(self, context, instance_id):
- return [dict(address='10.0.0.0'), dict(address='10.0.0.1'),
+ return [dict(address='10.0.0.0'), dict(address='10.0.0.1'),
dict(address='10.0.0.2')]
def network_get_by_cidr(self, context, cidr):
diff --git a/nova/tests/scheduler/test_scheduler.py b/nova/tests/scheduler/test_scheduler.py
index 0b51792a0..3a10e9287 100644
--- a/nova/tests/scheduler/test_scheduler.py
+++ b/nova/tests/scheduler/test_scheduler.py
@@ -1069,7 +1069,7 @@ class ZoneRedirectTest(test.TestCase):
self.assertEquals(decorator.get_collection_context_and_id(
(None, 10, 20), {}), ("servers", 10, 20))
self.assertEquals(decorator.get_collection_context_and_id(
- (None, 11,), dict(instance_id=21)), ("servers", 11, 21))
+ (None, 11,), dict(instance_id=21)), ("servers", 11, 21))
self.assertEquals(decorator.get_collection_context_and_id(
(None,), dict(context=12, instance_id=22)), ("servers", 12, 22))
diff --git a/nova/tests/test_libvirt.py b/nova/tests/test_libvirt.py
index 39aa4ad41..aefe26cc8 100644
--- a/nova/tests/test_libvirt.py
+++ b/nova/tests/test_libvirt.py
@@ -159,14 +159,14 @@ class LibvirtConnTestCase(test.TestCase):
self.flags(instances_path='')
self.call_libvirt_dependant_setup = False
- test_instance = {'memory_kb': '1024000',
- 'basepath': '/some/path',
- 'bridge_name': 'br100',
- 'vcpus': 2,
- 'project_id': 'fake',
- 'bridge': 'br101',
- 'image_ref': '123456',
- 'local_gb': 20,
+ test_instance = {'memory_kb': '1024000',
+ 'basepath': '/some/path',
+ 'bridge_name': 'br100',
+ 'vcpus': 2,
+ 'project_id': 'fake',
+ 'bridge': 'br101',
+ 'image_ref': '123456',
+ 'local_gb': 20,
'instance_type_id': '5'} # m1.small
def lazy_load_library_exists(self):