summaryrefslogtreecommitdiff
path: root/tests/test_cfg.py
diff options
context:
space:
mode:
authorDoug Hellmann <doug@doughellmann.com>2014-10-08 15:49:23 -0400
committerDoug Hellmann <doug@doughellmann.com>2014-10-08 15:49:23 -0400
commite0ad7fa65db81cec53d7d0fb4f9d6c2b46520e0f (patch)
tree877dbcb08eab432bb192d69fe9b4d0d6e9fb3615 /tests/test_cfg.py
parentf7c54d9ae23339f390ecc5c4410dbd705e1fbf01 (diff)
downloadoslo-config-e0ad7fa65db81cec53d7d0fb4f9d6c2b46520e0f.tar.gz
delay formatting debug log message
Pass arguments to the logger and let it assemble the formatted message if it will be emitted. Change-Id: I2cf66dcc98bb2324f34442e51e47691ec445d280
Diffstat (limited to 'tests/test_cfg.py')
-rw-r--r--tests/test_cfg.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/test_cfg.py b/tests/test_cfg.py
index 9579be2..590c0c8 100644
--- a/tests/test_cfg.py
+++ b/tests/test_cfg.py
@@ -988,8 +988,11 @@ class ConfigFileOptsTestCase(BaseTestCase):
def test_conf_file_list_default_wrong_type(self, mock_log):
cfg.ListOpt('foo', default=25)
mock_log.debug.assert_called_once_with(
- 'Expected default value of type(s) list but '
- 'got "25" of type int')
+ 'Expected default value of type(s) %(extypes)s but '
+ 'got %(default)r of type %(deftypes)s',
+ {'extypes': 'list',
+ 'default': 25,
+ 'deftypes': 'int'})
def test_conf_file_list_value(self):
self.conf.register_opt(cfg.ListOpt('foo'))