

def fake_fault_obj(context, instance_uuid, code=404, message='HTTPNotFound', details='Stock details for test', **updates):
    fault = {
        'id': 1,
        'instance_uuid': instance_uuid,
        'code': code,
        'message': message,
        'details': details,
        'host': 'fake_host',
        'deleted': False,
        'created_at': datetime.datetime(2010, 10, 10, 12, 0, 0),
        'updated_at': None,
        'deleted_at': None,
    }
    if updates:
        fault.update(updates)
    return objects.InstanceFault._from_db_object(context, objects.InstanceFault(), fault)

dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/tests/unit/fake_instance.py fake_fault_obj/original