diff options
author | Gary Kotton <gkotton@redhat.com> | 2012-06-17 04:05:37 -0400 |
---|---|---|
committer | Gary Kotton <gkotton@redhat.com> | 2012-06-18 01:15:09 -0400 |
commit | 9f938720f158889252fa1db44be96745fa48e1ff (patch) | |
tree | 5383ca2084fc6e188c59bef6224c78b2719a5ed9 /tests/unit/test_cfg.py | |
parent | 925edb3ee8bbd97afaa43b2888ab45d2bca50faf (diff) | |
download | oslo-9f938720f158889252fa1db44be96745fa48e1ff.tar.gz oslo-9f938720f158889252fa1db44be96745fa48e1ff.tar.xz oslo-9f938720f158889252fa1db44be96745fa48e1ff.zip |
Update common code to support pep 1.3.
bug 1014216
Change-Id: I3f8fa2e11c9d3f3d34fb20f65ce886bb9c94463d
Diffstat (limited to 'tests/unit/test_cfg.py')
-rw-r--r-- | tests/unit/test_cfg.py | 43 |
1 files changed, 20 insertions, 23 deletions
diff --git a/tests/unit/test_cfg.py b/tests/unit/test_cfg.py index 25cf57e..c72c18e 100644 --- a/tests/unit/test_cfg.py +++ b/tests/unit/test_cfg.py @@ -296,8 +296,8 @@ class ConfigFileOptsTestCase(BaseTestCase): self.conf.register_opt(opt_class('newfoo', deprecated_name='oldfoo')) paths2 = self.create_tempfiles([('test', - '[DEFAULT]\n' - 'newfoo = %s\n' % value)]) + '[DEFAULT]\n' + 'newfoo = %s\n' % value)]) self.conf(['--config-file', paths2[0]]) self.assertTrue(hasattr(self.conf, 'newfoo')) @@ -306,8 +306,7 @@ class ConfigFileOptsTestCase(BaseTestCase): def test_conf_file_str_default(self): self.conf.register_opt(StrOpt('foo', default='bar')) - paths = self.create_tempfiles([('test', - '[DEFAULT]\n')]) + paths = self.create_tempfiles([('test', '[DEFAULT]\n')]) self.conf(['--config-file', paths[0]]) @@ -317,9 +316,7 @@ class ConfigFileOptsTestCase(BaseTestCase): def test_conf_file_str_value(self): self.conf.register_opt(StrOpt('foo')) - paths = self.create_tempfiles([('test', - '[DEFAULT]\n' - 'foo = bar\n')]) + paths = self.create_tempfiles([('test', '[DEFAULT]\n''foo = bar\n')]) self.conf(['--config-file', paths[0]]) @@ -577,7 +574,7 @@ class ConfigFileOptsTestCase(BaseTestCase): def test_conf_file_multistr_values_append_deprecated(self): self.conf.register_cli_opt(MultiStrOpt('foo', - deprecated_name='oldfoo')) + deprecated_name='oldfoo')) paths = self.create_tempfiles([('1', '[DEFAULT]\n' @@ -713,7 +710,7 @@ class OptGroupsTestCase(BaseTestCase): def test_arg_group_in_config_file_with_deprecated(self): self.conf.register_group(OptGroup('blaa')) self.conf.register_opt(StrOpt('foo', deprecated_name='oldfoo'), - group='blaa') + group='blaa') paths = self.create_tempfiles([('test', '[blaa]\n' @@ -1410,20 +1407,20 @@ class OptDumpingTestCase(BaseTestCase): self.conf.log_opt_values(logger, 666) self.assertEquals(logger.logged, [ - "*" * 80, - "Configuration options gathered from:", - "command line args: ['--foo', 'this', '--blaa-bar', 'that', " - "'--blaa-key', 'admin', '--passwd', 'hush']", - "config files: []", - "=" * 80, - "config_dir = None", - "config_file = []", - "foo = this", - "passwd = ****", - "blaa.bar = that", - "blaa.key = *****", - "*" * 80, - ]) + "*" * 80, + "Configuration options gathered from:", + "command line args: ['--foo', 'this', '--blaa-bar', " + "'that', '--blaa-key', 'admin', '--passwd', 'hush']", + "config files: []", + "=" * 80, + "config_dir = None", + "config_file = []", + "foo = this", + "passwd = ****", + "blaa.bar = that", + "blaa.key = *****", + "*" * 80, + ]) class CommonOptsTestCase(BaseTestCase): |