summaryrefslogtreecommitdiffstats
path: root/tests/unit
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2012-02-10 17:32:00 +0000
committerGerrit Code Review <review@openstack.org>2012-02-10 17:32:00 +0000
commit2ad09351f3c4f69ffcae16815b76eb28cb07a9b7 (patch)
treeff2aa55cbd462baa502067273f608d03ddf6ae48 /tests/unit
parent763940b4526ab0e5dbdf38bd8d904b56913e7179 (diff)
parent8723af7665d004ae088d5066b795877c7d8f890f (diff)
downloadoslo-2ad09351f3c4f69ffcae16815b76eb28cb07a9b7.tar.gz
oslo-2ad09351f3c4f69ffcae16815b76eb28cb07a9b7.tar.xz
oslo-2ad09351f3c4f69ffcae16815b76eb28cb07a9b7.zip
Merge "Disable ConfigParser interpolation (lp#930270)"
Diffstat (limited to 'tests/unit')
-rw-r--r--tests/unit/test_cfg.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/unit/test_cfg.py b/tests/unit/test_cfg.py
index c93f444..8dd6352 100644
--- a/tests/unit/test_cfg.py
+++ b/tests/unit/test_cfg.py
@@ -469,6 +469,18 @@ class ConfigFileOptsTestCase(BaseTestCase):
self.assertTrue(hasattr(self.conf, 'bar'))
self.assertEquals(self.conf.bar, 'foo')
+ def test_conf_file_raw_value(self):
+ self.conf.register_opt(StrOpt('foo'))
+
+ paths = self.create_tempfiles([('test.conf',
+ '[DEFAULT]\n'
+ 'foo = bar-%08x\n')])
+
+ self.conf(['--config-file', paths[0]])
+
+ self.assertTrue(hasattr(self.conf, 'foo'))
+ self.assertEquals(self.conf.foo, 'bar-%08x')
+
class OptGroupsTestCase(BaseTestCase):