From cfa84448e026805fa198b06fe06c9ccc2ebafd2c Mon Sep 17 00:00:00 2001 From: Arata Notsu Date: Wed, 7 Nov 2012 00:38:31 +0900 Subject: Fix verification in test_api_samples.py Some regexps are corrected. Change-Id: I77bb6503352083254d8887b6cb513c45bcfae99c --- nova/tests/integrated/test_api_samples.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nova/tests/integrated/test_api_samples.py b/nova/tests/integrated/test_api_samples.py index 3bcd737bb..81c8e91c0 100644 --- a/nova/tests/integrated/test_api_samples.py +++ b/nova/tests/integrated/test_api_samples.py @@ -178,6 +178,7 @@ class ApiSampleTestBase(integrated_helpers._IntegratedTestBase): result = str(result) expected = expected.replace('int:', '') expected = expected % subs + expected = '^%s$' % expected match = re.match(expected, result) if not match: raise NoMatch(_('Values do not match:\n' @@ -225,7 +226,7 @@ class ApiSampleTestBase(integrated_helpers._IntegratedTestBase): '(Z|(\+|-)\d{2}:\d{2}|\.\d{6})', 'password': '[0-9a-zA-Z]{1,12}', 'ip': '[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}', - 'ip6': '([0-9a-zA-Z]{1,4}:){1,7}:?[0-9a-zA-Z]', + 'ip6': '([0-9a-zA-Z]{1,4}:){1,7}:?[0-9a-zA-Z]{1,4}', 'id': '(?P[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}' '-[0-9a-f]{4}-[0-9a-f]{12})', 'uuid': '[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}' -- cgit