From 67ee9c1fd4034d2375e0f746d4fd78c7829825ba Mon Sep 17 00:00:00 2001 From: Salvatore Orlando Date: Wed, 6 Jul 2011 12:41:13 +0100 Subject: [PATCH] removing pep8 errors --- quantum/plugins/SamplePlugin.py | 6 +++--- tests/functional/__init__.py | 6 ++---- tests/unit/testlib.py | 2 ++ 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/quantum/plugins/SamplePlugin.py b/quantum/plugins/SamplePlugin.py index 086f55875..d78b84512 100644 --- a/quantum/plugins/SamplePlugin.py +++ b/quantum/plugins/SamplePlugin.py @@ -243,9 +243,9 @@ class FakePlugin(object): FakePlugin._net_counter = 0 def _get_network(self, tenant_id, network_id): - try: + try: network = db.network_get(network_id) - except: + except: raise exc.NetworkNotFound(net_id=network_id) return network @@ -331,7 +331,7 @@ class FakePlugin(object): Virtual Network. """ LOG.debug("FakePlugin.rename_network() called") - try: + try: db.network_rename(net_id, tenant_id, new_name) except: raise exc.NetworkNotFound(net_id=net_id) diff --git a/tests/functional/__init__.py b/tests/functional/__init__.py index bd79dcdff..92e959824 100644 --- a/tests/functional/__init__.py +++ b/tests/functional/__init__.py @@ -76,7 +76,7 @@ class Server(object): if kwargs: conf_override.update(**kwargs) - # Create temporary configuration file for Quantum Unit tests. + # Create temporary configuration file for Quantum Unit tests. conf_file = tempfile.NamedTemporaryFile() conf_file.write(self.conf_base % conf_override) @@ -188,7 +188,6 @@ class FunctionalTest(unittest.TestCase): self.quantum_server = QuantumAPIServer(self.test_dir, self.test_port) - def tearDown(self): self.cleanup() # We destroy the test data store between each test case, @@ -227,7 +226,6 @@ class FunctionalTest(unittest.TestCase): exitcode, out, err = execute(cmd) self.assertEqual(0, exitcode) - def start_servers(self, **kwargs): """ Starts the Quantum API server on an unused port. @@ -242,7 +240,7 @@ class FunctionalTest(unittest.TestCase): "Failed to spin up the Quantum server. " "Got: %s" % err) #self.assertTrue("Starting quantum with" in out) - #TODO: replace with appropriate assert + #TODO: replace with appropriate assert self.wait_for_servers() diff --git a/tests/unit/testlib.py b/tests/unit/testlib.py index 357abd83a..724cd0a92 100644 --- a/tests/unit/testlib.py +++ b/tests/unit/testlib.py @@ -35,6 +35,7 @@ def new_network_request(tenant_id, network_name, format='xml'): body = Serializer().serialize(data, content_type) return create_request(path, body, content_type, method) + def update_network_request(tenant_id, network_id, network_name, format='xml'): method = 'PUT' path = "/tenants/%(tenant_id)s/networks" \ @@ -44,6 +45,7 @@ def update_network_request(tenant_id, network_id, network_name, format='xml'): body = Serializer().serialize(data, content_type) return create_request(path, body, content_type, method) + def network_delete_request(tenant_id, network_id, format='xml'): method = 'DELETE' path = "/tenants/%(tenant_id)s/networks/" \ -- 2.45.2