@staticmethod
    def _compare(test, db, obj, ignored_fields=None):
        if ignored_fields is None:
            ignored_fields = []
        for field, value in db.items():
            if field in ignored_fields:
                continue
            obj_field = field
            if obj_field == 'uuid':
                obj_field = 'instance_uuid'
            test.assertEqual(db[field], getattr(obj, obj_field),
                    field % 'Field %s is not equal')
dataset/ETHPy150Open openstack/nova/nova/tests/unit/objects/test_bandwidth_usage.py/_TestBandwidthUsage._compare/swapped operands of `%`