Fix several flake8 code style issues in compute tests.

Fix issues:
H402 one line docstring needs punctuation,
W503 line break before binary operator.

Change-Id: Ie93430898403f137e7b647a97a28b0d7a4ebb463
This commit is contained in:
Kyrylo Romanenko 2016-06-24 14:45:19 +03:00
parent 6828f5ce27
commit f2b73c2737
4 changed files with 12 additions and 12 deletions

View File

@ -16,7 +16,7 @@ from functional.common import test
class ComputeAgentTests(test.TestCase): class ComputeAgentTests(test.TestCase):
"""Functional tests for compute agent. """ """Functional tests for compute agent."""
ID = None ID = None
MD5HASH = hashlib.md5().hexdigest() MD5HASH = hashlib.md5().hexdigest()
@ -32,11 +32,11 @@ class ComputeAgentTests(test.TestCase):
@classmethod @classmethod
def setUpClass(cls): def setUpClass(cls):
opts = cls.get_show_opts(cls.HEADERS) opts = cls.get_show_opts(cls.HEADERS)
raw_output = cls.openstack('compute agent create ' raw_output = cls.openstack('compute agent create ' +
+ cls.OS + ' ' + cls.ARCH + ' ' cls.OS + ' ' + cls.ARCH + ' ' +
+ cls.VER + ' ' + cls.URL + ' ' cls.VER + ' ' + cls.URL + ' ' +
+ cls.MD5HASH + ' ' + cls.HYPER + ' ' cls.MD5HASH + ' ' + cls.HYPER + ' ' +
+ opts) opts)
# Get agent id because agent can only be deleted by ID # Get agent id because agent can only be deleted by ID
output_list = raw_output.split('\n', 1) output_list = raw_output.split('\n', 1)
@ -64,9 +64,9 @@ class ComputeAgentTests(test.TestCase):
url = "http://openstack" url = "http://openstack"
md5hash = hashlib.md5().hexdigest() md5hash = hashlib.md5().hexdigest()
raw_output = self.openstack('compute agent set ' raw_output = self.openstack('compute agent set ' +
+ self.ID + ' ' + ver + ' ' self.ID + ' ' + ver + ' ' +
+ url + ' ' + md5hash) url + ' ' + md5hash)
self.assertEqual('', raw_output) self.assertEqual('', raw_output)
raw_output = self.openstack('compute agent list') raw_output = self.openstack('compute agent list')

View File

@ -16,7 +16,7 @@ from functional.common import test
class AggregateTests(test.TestCase): class AggregateTests(test.TestCase):
"""Functional tests for aggregate. """ """Functional tests for aggregate."""
NAME = uuid.uuid4().hex NAME = uuid.uuid4().hex
HEADERS = ['Name'] HEADERS = ['Name']

View File

@ -16,7 +16,7 @@ from functional.common import test
class FlavorTests(test.TestCase): class FlavorTests(test.TestCase):
"""Functional tests for flavor. """ """Functional tests for flavor."""
NAME = uuid.uuid4().hex NAME = uuid.uuid4().hex
HEADERS = ['Name'] HEADERS = ['Name']

View File

@ -16,7 +16,7 @@ from functional.common import test
class ServerGroupTests(test.TestCase): class ServerGroupTests(test.TestCase):
"""Functional tests for servergroup. """ """Functional tests for servergroup."""
NAME = uuid.uuid4().hex NAME = uuid.uuid4().hex
HEADERS = ['Name'] HEADERS = ['Name']