From c65963733affd8d47a8cacdd0e533f728be10f8a Mon Sep 17 00:00:00 2001
From: Gary Williams <gary.williams@forgerock.com>
Date: Fri, 29 Jul 2011 19:40:26 +0000
Subject: [PATCH] ecl functional tests parse correctly cookie with multi-suffixes

---
 opends/tests/staf-tests/shared/python/common.py |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/opends/tests/staf-tests/shared/python/common.py b/opends/tests/staf-tests/shared/python/common.py
index 5fcdff4..b3b3f41 100644
--- a/opends/tests/staf-tests/shared/python/common.py
+++ b/opends/tests/staf-tests/shared/python/common.py
@@ -753,14 +753,20 @@
 
   changeEntry=result[0][1].split("\n")
 
-  attr=''
+  attrVal=''
   for changeAttr in changeEntry:
     #print changeAttr
     if changeAttr.startswith(attribute):
-      print 'get_last_attr_from_entry: %s' % changeAttr
-      attr = ' '.join(changeAttr.split(' ')[1:3])
+      #print 'get_last_attr_from_entry: %s' % changeAttr
+      attrVal = changeAttr.replace('%s: ' % attribute,'')
 
-  return attr.replace(';','')
+  if attrVal != '' and attrVal[len(attrVal)-1] == ';' :
+    lastAttr = attrVal[0:len(attrVal)-1]
+  else:
+    lastAttr = attrVal
+
+  print 'get_last_attr_from_entry: %s' % lastAttr
+  return lastAttr
 
 def list_matches(mylist):
 

--
Gitblit v1.10.0