diff options
author | 2016-10-01 02:21:36 +0800 | |
---|---|---|
committer | 2016-10-01 02:23:53 +0800 | |
commit | 6204bfbe6228d5167bdb67c42cac4c884cdcf664 (patch) | |
tree | b67981719c8aa0542e040d70951bdb7aff044aad /utils/infra_setup/heat/tests/generate_template_test.py | |
parent | 3ac496ac711f40f2a4c4fb0837758b4fbade43e4 (diff) |
autopep8 fix for flake8
JIRA: BOTTLENECK-101
Using autopep8 to fix the python style scanned by flake8
Change-Id: I74bf28ed4d999dac3dd36e9101f099c9853a49b6
Signed-off-by: yuyang <Gabriel.yuyang@huawei.com>
Diffstat (limited to 'utils/infra_setup/heat/tests/generate_template_test.py')
-rwxr-xr-x | utils/infra_setup/heat/tests/generate_template_test.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/utils/infra_setup/heat/tests/generate_template_test.py b/utils/infra_setup/heat/tests/generate_template_test.py index d4e0a234..83c905ad 100755 --- a/utils/infra_setup/heat/tests/generate_template_test.py +++ b/utils/infra_setup/heat/tests/generate_template_test.py @@ -16,6 +16,7 @@ sys.path.append("..") import template import common + def reset_common(): common.LOG = None common.CONF_FILE = None @@ -26,7 +27,9 @@ def reset_common(): common.TEMPLATE_NAME = None common.TEMPLATE_EXTENSION = None + class TestGeneratesTemplate(unittest.TestCase): + def setUp(self): self.deployment_configuration = { 'flavor': ['medium'] @@ -42,7 +45,8 @@ class TestGeneratesTemplate(unittest.TestCase): def test_generates_template_for_success(self, mock_template_dir, mock_log): tmp_generated_templates_dir = '/data/generated_templates/' - generated_templates_dir = "{}{}".format(os.getcwd(), tmp_generated_templates_dir) + generated_templates_dir = "{}{}".format( + os.getcwd(), tmp_generated_templates_dir) mock_template_dir.return_value = generated_templates_dir tmp_test_templates = '/data/test_templates/' test_templates = "{}{}".format(os.getcwd(), tmp_test_templates) @@ -69,7 +73,8 @@ class TestGeneratesTemplate(unittest.TestCase): @mock.patch('common.get_template_dir') def test_get_all_heat_templates_for_success(self, template_dir): tmp_generated_templates = '/data/generated_templates/' - generated_templates = "{}{}".format(os.getcwd(), tmp_generated_templates) + generated_templates = "{}{}".format( + os.getcwd(), tmp_generated_templates) template_dir.return_value = generated_templates extension = '.yaml' expected = ['test_template_1.yaml'] |