diff --git a/nova/tests/test_api.py b/nova/tests/test_api.py index 163afda7..0835df51 100644 --- a/nova/tests/test_api.py +++ b/nova/tests/test_api.py @@ -350,7 +350,7 @@ class ApiEc2TestCase(test.TestCase): self.ec2.delete_security_group(security_group_name) def test_group_name_valid_chars_security_group(self): - """ Test that we sanely handle invalid security group names. + """Test that we sanely handle invalid security group names. EC2 API Spec states we should only accept alphanumeric characters, spaces, dashes, and underscores. Amazon implementation accepts more characters - so, [:print:] is ok. """ diff --git a/nova/tests/test_db_api.py b/nova/tests/test_db_api.py index af329daf..dc0c57c1 100644 --- a/nova/tests/test_db_api.py +++ b/nova/tests/test_db_api.py @@ -321,7 +321,7 @@ class DbApiTestCase(test.TestCase): inst['uuid'], 'vm_state', [None, 'disable'], 'run') def test_instance_update_with_instance_uuid(self): - """ test instance_update() works when an instance UUID is passed """ + """test instance_update() works when an instance UUID is passed """ ctxt = context.get_admin_context() # Create an instance with some metadata @@ -479,7 +479,7 @@ class DbApiTestCase(test.TestCase): self.assertEqual(404, faults[uuid][0]['code']) def test_instance_fault_get_by_instance(self): - """ ensure we can retrieve an instance fault by instance UUID """ + """ensure we can retrieve an instance fault by instance UUID """ ctxt = context.get_admin_context() instance1 = db.instance_create(ctxt, {}) instance2 = db.instance_create(ctxt, {}) diff --git a/nova/tests/test_libvirt.py b/nova/tests/test_libvirt.py index 6bc18251..a64b7269 100644 --- a/nova/tests/test_libvirt.py +++ b/nova/tests/test_libvirt.py @@ -4303,12 +4303,12 @@ class LibvirtDriverTestCase(test.TestCase): self.stubs.Set(utils, 'execute', fake_execute) ins_ref = self._create_instance() - """ dest is different host case """ + # dest is different host case out = self.libvirtconnection.migrate_disk_and_power_off( None, ins_ref, '10.0.0.2', None, None) self.assertEquals(out, disk_info_text) - """ dest is same host case """ + # dest is same host case out = self.libvirtconnection.migrate_disk_and_power_off( None, ins_ref, '10.0.0.1', None, None) self.assertEquals(out, disk_info_text) @@ -4325,19 +4325,19 @@ class LibvirtDriverTestCase(test.TestCase): self.stubs.Set(self.libvirtconnection, 'get_info', fake_get_info) - """ instance not found case """ + # instance not found case self.assertRaises(exception.NotFound, self.libvirtconnection._wait_for_running, {'name': 'not_found', 'uuid': 'not_found_uuid'}) - """ instance is running case """ + # instance is running case self.assertRaises(utils.LoopingCallDone, self.libvirtconnection._wait_for_running, {'name': 'running', 'uuid': 'running_uuid'}) - """ else case """ + # else case self.libvirtconnection._wait_for_running({'name': 'else', 'uuid': 'other_uuid'}) diff --git a/nova/tests/test_xenapi.py b/nova/tests/test_xenapi.py index 8b57dfef..5b347fc0 100644 --- a/nova/tests/test_xenapi.py +++ b/nova/tests/test_xenapi.py @@ -2509,7 +2509,7 @@ class StubDependencies(object): class ResourcePoolWithStubs(StubDependencies, pool.ResourcePool): - """ A ResourcePool, use stub dependencies """ + """A ResourcePool, use stub dependencies """ class HypervisorPoolTestCase(test.TestCase): diff --git a/nova/tests/xenapi/stubs.py b/nova/tests/xenapi/stubs.py index ca828129..a44f3e9f 100644 --- a/nova/tests/xenapi/stubs.py +++ b/nova/tests/xenapi/stubs.py @@ -98,7 +98,7 @@ def stubout_determine_is_pv_objectstore(stubs): def stubout_is_snapshot(stubs): - """ Always returns true + """Always returns true xenapi fake driver does not create vmrefs for snapshots """ def f(*args): @@ -158,7 +158,7 @@ def _make_fake_vdi(): class FakeSessionForVMTests(fake.SessionBase): - """ Stubs out a XenAPISession for VM tests """ + """Stubs out a XenAPISession for VM tests """ _fake_iptables_save_output = ("# Generated by iptables-save v1.4.10 on " "Sun Nov 6 22:49:02 2011\n" @@ -204,7 +204,7 @@ class FakeSessionForVMTests(fake.SessionBase): class FakeSessionForFirewallTests(FakeSessionForVMTests): - """ Stubs out a XenApi Session for doing IPTable Firewall tests """ + """Stubs out a XenApi Session for doing IPTable Firewall tests """ def __init__(self, uri, test_case=None): super(FakeSessionForFirewallTests, self).__init__(uri) @@ -270,7 +270,7 @@ def stub_out_vm_methods(stubs): class FakeSessionForVolumeTests(fake.SessionBase): - """ Stubs out a XenAPISession for Volume tests """ + """Stubs out a XenAPISession for Volume tests """ def VDI_introduce(self, _1, uuid, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11): valid_vdi = False @@ -284,7 +284,7 @@ class FakeSessionForVolumeTests(fake.SessionBase): class FakeSessionForVolumeFailedTests(FakeSessionForVolumeTests): - """ Stubs out a XenAPISession for Volume tests: it injects failures """ + """Stubs out a XenAPISession for Volume tests: it injects failures """ def VDI_introduce(self, _1, uuid, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11): # This is for testing failure