def test_handle_edit_metadata(session, req, editor_user, some_node, simple_mask_with_maskitems): mask = simple_mask_with_maskitems nodes = [some_node] node = some_node make_node_public(some_node) schema.init() req.session["user_id"] = editor_user.id req.form["testattr"] = u"updated" session.commit() _handle_edit_metadata(req, mask, nodes) assert node["testattr"] == u"updated"
def init_modules(): """init modules with own init function""" from core.transition.app import create_app import core core.app = create_app() from contenttypes.default import init_maskcache init_maskcache() from export import oaisets oaisets.init() from schema import schema schema.init() from core.plugins import init_plugins init_plugins()
def init_modules(): """init modules with own init function""" from export import oaisets if config.getboolean("oai.activate", False): oaisets.init() from export import exportutils exportutils.init() from schema import schema schema.init() from core import xmlnode # xmlnode.init() from core import auth auth.init() from export import exportutils exportutils.init()