summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRuan HE <ruan.he@orange.com>2015-09-18 10:24:31 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2015-09-18 10:24:31 +0000
commit7ab1b9f6f3c0b50d46c066d9dff700ce396abe2e (patch)
treed124a1a444b48f3c49db510da39b12219c029047
parent7c5c438598ad3bdf1c2a12717a058481dab80dc7 (diff)
parent667bcc34cf1db96dbf28aa50a65f365e0dc829e7 (diff)
Merge "Change the way the data strings are replaced to allow similar variables on the same line."
-rw-r--r--moonclient/moonclient/tests.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/moonclient/moonclient/tests.py b/moonclient/moonclient/tests.py
index 63f1ed14..1e1020bf 100644
--- a/moonclient/moonclient/tests.py
+++ b/moonclient/moonclient/tests.py
@@ -33,7 +33,7 @@ class TestsLaunch(Lister):
def __replace_var_in_str(self, data_str):
for exp in re.findall("\$\w+", data_str):
if exp.replace("$", "") in self.result_vars:
- data_str = data_str.replace(exp, self.result_vars[exp.replace("$", "")])
+ data_str = re.sub(exp.replace("$", "\$") + "(?=$|\s)", self.result_vars[exp.replace("$", "")], data_str)
return data_str
def __compare_results(self, expected, observed):