@staticmethod
def convert_dicts_to_test_format(origin: str, data: list) ->list:
    """
        Convert a list of dictionaries in a format ready for tests.

        :param origin: The parent key of the dictionary
        :param data: The list of dictionaries to convert
        :return: The resulting assertions
        """
    result = []
    for item in data:
        elements = []
        for k, value in item.items():
            if isinstance(value, str):
                elements.append("%s=='%s'" % (k, value))
            elif isinstance(value, bool):
                elements.append('%s==`%s`' % (k, 'true' if value else 'false'))
            elif isinstance(value, (int, float)):
                elements.append('%s==`%s`' % (k, value))
        result.append('%s[?%s]' % (origin, ' && '.join(elements)))
    return result
