def register_callback(operation, resource_type=EXP_RESOURCE_TYPE):
 callback = mock.Mock(__name__='callback', im_class=mock.Mock(__name__='class'))
 notifications.register_event_callback(operation, resource_type, callback)
 return callback

def register_callback ( operation , resource_type = EXP_RESOURCE_TYPE ) : callback = mock . Mock ( __name__ = 'callback' , im_class = mock . Mock ( __name__ = 'class' ) ) notifications . register_event_callback ( operation , resource_type , callback ) return callback
helper for creating and registering a mock callback .