当前位置: 首页>>代码示例>>Python>>正文


Python IMAP.user_mailbox_create_additional_folders方法代码示例

本文整理汇总了Python中pykolab.imap.IMAP.user_mailbox_create_additional_folders方法的典型用法代码示例。如果您正苦于以下问题:Python IMAP.user_mailbox_create_additional_folders方法的具体用法?Python IMAP.user_mailbox_create_additional_folders怎么用?Python IMAP.user_mailbox_create_additional_folders使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pykolab.imap.IMAP的用法示例。


在下文中一共展示了IMAP.user_mailbox_create_additional_folders方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: setup_class

# 需要导入模块: from pykolab.imap import IMAP [as 别名]
# 或者: from pykolab.imap.IMAP import user_mailbox_create_additional_folders [as 别名]
    def setup_class(self, *args, **kw):
        # set language to default
        pykolab.translate.setUserLanguage(conf.get('kolab','default_locale'))

        self.itip_reply_subject = _('"%(summary)s" has been %(status)s')

        from tests.functional.purge_users import purge_users
        purge_users()

        self.john = {
            'displayname': 'John Doe',
            'mail': '[email protected]',
            'dn': 'uid=doe,ou=People,dc=example,dc=org',
            'preferredlanguage': 'en_US',
            'mailbox': 'user/[email protected]',
            'kolabcalendarfolder': 'user/john.doe/[email protected]',
            'kolabtasksfolder': 'user/john.doe/[email protected]',
            'kolabinvitationpolicy': ['ACT_UPDATE_AND_NOTIFY','ACT_MANUAL']
        }

        self.jane = {
            'displayname': 'Jane Manager',
            'mail': '[email protected]',
            'dn': 'uid=manager,ou=People,dc=example,dc=org',
            'preferredlanguage': 'en_US',
            'mailbox': 'user/[email protected]',
            'kolabcalendarfolder': 'user/jane.manager/[email protected]',
            'kolabtasksfolder': 'user/jane.manager/[email protected]',
            'kolabconfidentialcalendar': 'user/jane.manager/Calendar/[email protected]',
            'kolabinvitationpolicy': ['ACT_ACCEPT_IF_NO_CONFLICT','ACT_REJECT_IF_CONFLICT','TASK_ACCEPT','ACT_UPDATE']
        }

        self.jack = {
            'displayname': 'Jack Tentative',
            'mail': '[email protected]',
            'dn': 'uid=tentative,ou=People,dc=example,dc=org',
            'preferredlanguage': 'en_US',
            'mailbox': 'user/[email protected]',
            'kolabcalendarfolder': 'user/jack.tentative/[email protected]',
            'kolabtasksfolder': 'user/jack.tentative/[email protected]',
            'kolabinvitationpolicy': ['ACT_TENTATIVE_IF_NO_CONFLICT','ALL_SAVE_TO_FOLDER','ACT_UPDATE']
        }

        self.mark = {
            'displayname': 'Mark German',
            'mail': '[email protected]',
            'dn': 'uid=german,ou=People,dc=example,dc=org',
            'preferredlanguage': 'de_DE',
            'mailbox': 'user/[email protected]',
            'kolabcalendarfolder': 'user/mark.german/[email protected]',
            'kolabtasksfolder': 'user/mark.german/[email protected]',
            'kolabinvitationpolicy': ['ACT_ACCEPT','ACT_UPDATE_AND_NOTIFY']
        }

        self.external = {
            'displayname': 'Bob External',
            'mail': '[email protected]'
        }

        from tests.functional.user_add import user_add
        user_add("John", "Doe", kolabinvitationpolicy=self.john['kolabinvitationpolicy'], preferredlanguage=self.john['preferredlanguage'])
        user_add("Jane", "Manager", kolabinvitationpolicy=self.jane['kolabinvitationpolicy'], preferredlanguage=self.jane['preferredlanguage'])
        user_add("Jack", "Tentative", kolabinvitationpolicy=self.jack['kolabinvitationpolicy'], preferredlanguage=self.jack['preferredlanguage'])
        user_add("Mark", "German", kolabinvitationpolicy=self.mark['kolabinvitationpolicy'], preferredlanguage=self.mark['preferredlanguage'])

        time.sleep(1)
        from tests.functional.synchronize import synchronize_once
        synchronize_once()

        # create confidential calendar folder for jane
        imap = IMAP()
        imap.connect(domain='example.org') # sets self.domain
        imap.user_mailbox_create_additional_folders(self.jane['mail'], {
            'Calendar/Confidential': {
                'annotations': {
                    '/shared/vendor/kolab/folder-type': "event",
                    '/private/vendor/kolab/folder-type': "event.confidential"
                }
            }
        })
        imap.disconnect()
开发者ID:tpokorra,项目名称:pykolab,代码行数:83,代码来源:test_007_invitationpolicy.py


注:本文中的pykolab.imap.IMAP.user_mailbox_create_additional_folders方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。