Ejemplo n.º 1
0
    def __init__(self, _database_access, _rights=None):
        """
        Initializes that node object and groups.

        :param _database_access: A database access instance

        """
        if _database_access is None:
            raise Exception("Node: The database access parameter is None, it must be set for the Node class to work")

        self.database_access = _database_access
        global node_rights

        if _rights is not None:
            node_rights = [id_right_admin_everything] + _rights
        else:
            node_rights = [id_right_admin_everything]

        init_groups(self.database_access)

        load_forms_from_directory(of_form_folder())
Ejemplo n.º 2
0
def step_impl(context):
    """
    :type context: behave.runner.Context
    """
    context.forms = {}
    load_forms_from_directory(of_form_folder())