'Returns a list of test dictionaries that the registry can use
against a given object to determine if the visualization can be
used with the object.'

def parse_tests(self, xml_tree_list):

    tests = []
    if (not xml_tree_list):
        return tests
    for test_elem in xml_tree_list:
        test_type = test_elem.get('type', 'eq')
        test_result = (test_elem.text.strip() if test_elem.text else None)
        if ((not test_type) or (not test_result)):
            log.warning(('Skipping    test.    Needs    both    type    attribute    and    text    node    to    be    parsed:    ' + ('%s,    %s' % (test_type, test_elem.text))))
            continue
        test_result = test_result.strip()
        test_attr = test_elem.get('test_attr')
        test_attr = (test_attr.split(self.ATTRIBUTE_SPLIT_CHAR) if isinstance(test_attr, string_types) else [])
        getter = self._build_getattr_lambda(test_attr)
        test_result_type = test_elem.get('result_type', 'string')
        if (test_type == 'isinstance'):
            def test_fn(o, result):
                return isinstance(getter(o), result)
        elif (test_type == 'has_dataprovider'):
            def test_fn(o, result):
                return (hasattr(getter(o), 'has_dataprovider') and getter(o).has_dataprovider(result))
        elif (test_type == 'has_attribute'):
            def test_fn(o, result):
                return hasattr(getter(o), result)
        elif (test_type == 'not_eq'):
            def test_fn(o, result):
                return (str(getter(o)) != result)
        else:
            def test_fn(o, result):
                return (str(getter(o)) == result)
        tests.append({'type': test_type, 'result': test_result, 'result_type': test_result_type, 'fn': test_fn})
    return tests
