diff options
Diffstat (limited to 'functionaltests/cli/v1/behaviors')
-rw-r--r-- | functionaltests/cli/v1/behaviors/acl_behaviors.py | 2 | ||||
-rw-r--r-- | functionaltests/cli/v1/behaviors/base_behaviors.py | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/functionaltests/cli/v1/behaviors/acl_behaviors.py b/functionaltests/cli/v1/behaviors/acl_behaviors.py index a9fc506..25478fd 100644 --- a/functionaltests/cli/v1/behaviors/acl_behaviors.py +++ b/functionaltests/cli/v1/behaviors/acl_behaviors.py @@ -48,7 +48,7 @@ class ACLBehaviors(base_behaviors.BaseBehaviors): argv.extend(['--project-access']) else: argv.extend(['--no-project-access']) - if operation_type and operation_type is not 'read': + if operation_type and operation_type != 'read': argv.extend([self._args_map_list['operation_type'][index], operation_type]) diff --git a/functionaltests/cli/v1/behaviors/base_behaviors.py b/functionaltests/cli/v1/behaviors/base_behaviors.py index 1c81723..3420cee 100644 --- a/functionaltests/cli/v1/behaviors/base_behaviors.py +++ b/functionaltests/cli/v1/behaviors/base_behaviors.py @@ -104,7 +104,7 @@ class BaseBehaviors(object): """ retval = {} if str is not None and len(str) > 0: - table_body = re.split('\+-*\+-*\+\n', str)[2:-1] + table_body = re.split(r'\+-*\+-*\+\n', str)[2:-1] lines = table_body[0].split('\n') for line in lines: if len(line) > 0: @@ -124,12 +124,12 @@ class BaseBehaviors(object): """ retval = [] if str is not None and len(str) > 0: - rows = re.findall('\|(.*?)\n', str) + rows = re.findall(r'\|(.*?)\n', str) # Remove header header_row = rows.pop(0) - key_names = re.findall('\s*(.*?)\s*\|', header_row) + key_names = re.findall(r'\s*(.*?)\s*\|', header_row) for row in rows: - values = re.findall('\s*(.*?)\s*\|', row) + values = re.findall(r'\s*(.*?)\s*\|', row) entry_dict = dict(zip(key_names, values)) retval.append(entry_dict) return retval |