summaryrefslogtreecommitdiffstats
path: root/tests/unit
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2013-08-05 15:40:28 +0000
committerGerrit Code Review <review@openstack.org>2013-08-05 15:40:28 +0000
commit82fa17f89501fe8b2dfd246ce5a8054f1c74c336 (patch)
tree29e5767fdb4211b1a7aa2b44f09afe0db692a5d9 /tests/unit
parentc8cf9d7e0508d83000100bd6c1685ee5db9322d5 (diff)
parented653bffa899dd6cabab20e4ab0283dc742e7da9 (diff)
downloadoslo-82fa17f89501fe8b2dfd246ce5a8054f1c74c336.tar.gz
oslo-82fa17f89501fe8b2dfd246ce5a8054f1c74c336.tar.xz
oslo-82fa17f89501fe8b2dfd246ce5a8054f1c74c336.zip
Merge "Fix Message format-string parsing"
Diffstat (limited to 'tests/unit')
-rw-r--r--tests/unit/test_gettext.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/unit/test_gettext.py b/tests/unit/test_gettext.py
index 93c0189..d9cb9b8 100644
--- a/tests/unit/test_gettext.py
+++ b/tests/unit/test_gettext.py
@@ -206,6 +206,19 @@ class MessageTestCase(utils.BaseTestCase):
self.assertEqual(result, msgid % params)
+ def test_regex_find_named_parameters_no_space(self):
+ msgid = ("Request: %(method)s http://%(server)s:"
+ "%(port)s%(url)s with headers %(headers)s")
+ params = {'method': 'POST',
+ 'server': 'test1',
+ 'port': 1234,
+ 'url': 'test2',
+ 'headers': {'h1': 'val1'}}
+
+ result = self._lazy_gettext(msgid) % params
+
+ self.assertEqual(result, msgid % params)
+
def test_regex_dict_is_parameter(self):
msgid = ("Test that we can inject a dictionary %s")
params = {'description': 'test1',