

def _compare_tasks(self, reference, result):
    'Compare deployment tasks.\n\n        Considering legacy format and compatible validator output with extra\n        fields where legacy fields is converted to new syntax.\n\n        :param reference: list of tasks\n        :type reference: list\n        :param result: list of tasks\n        :type result: list\n        '
    reference.sort(key=(lambda x: x.get('id', x.get('task_name'))))
    result.sort(key=(lambda x: x.get('id', x.get('task_name'))))
    self.assertEqual(len(reference), len(result))
    for (ref, res) in six.moves.zip(reference, result):
        for field in ref:
            if (field == '_custom'):
                self.assertEqual(jsonutils.loads(ref.get(field)), jsonutils.loads((res or {
                    
                }).get(field)))
            else:
                self.assertEqual(ref.get(field), (field or {
                    
                }).get(field))

dataset/ETHPy150Open openstack/fuel-web/nailgun/nailgun/test/base.py DeploymentTasksTestMixin._compare_tasks/VarMisuse@172/299 `res`->`field`