當前位置: 首頁>>代碼示例>>Python>>正文


Python GenericAccount.imap_password方法代碼示例

本文整理匯總了Python中inbox.models.backends.generic.GenericAccount.imap_password方法的典型用法代碼示例。如果您正苦於以下問題:Python GenericAccount.imap_password方法的具體用法?Python GenericAccount.imap_password怎麽用?Python GenericAccount.imap_password使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在inbox.models.backends.generic.GenericAccount的用法示例。


在下文中一共展示了GenericAccount.imap_password方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: add_fake_yahoo_account

# 需要導入模塊: from inbox.models.backends.generic import GenericAccount [as 別名]
# 或者: from inbox.models.backends.generic.GenericAccount import imap_password [as 別名]
def add_fake_yahoo_account(db_session, email_address='[email protected]'):
    import platform
    from inbox.models.backends.generic import GenericAccount
    from inbox.models import Namespace
    account = GenericAccount(email_address=email_address,
                             sync_host=platform.node(),
                             provider='yahoo')
    account.imap_password = 'bananagrams'
    account.smtp_password = 'bananagrams'
    account.namespace = Namespace()
    db_session.add(account)
    db_session.commit()
    return account
開發者ID:gisho,項目名稱:sync-engine,代碼行數:15,代碼來源:base.py

示例2: add_generic_imap_account

# 需要導入模塊: from inbox.models.backends.generic import GenericAccount [as 別名]
# 或者: from inbox.models.backends.generic.GenericAccount import imap_password [as 別名]
def add_generic_imap_account(db_session, email_address='[email protected]'):
    import platform
    from inbox.models.backends.generic import GenericAccount
    from inbox.models import Namespace
    account = GenericAccount(email_address=email_address,
                             sync_host=platform.node(),
                             provider='custom')
    account.imap_endpoint = ('imap.custom.com', 993)
    account.smtp_endpoint = ('smtp.custom.com', 587)
    account.imap_password = 'bananagrams'
    account.smtp_password = 'bananagrams'
    account.namespace = Namespace()
    db_session.add(account)
    db_session.commit()
    return account
開發者ID:gisho,項目名稱:sync-engine,代碼行數:17,代碼來源:base.py

示例3: add_account_with_different_namespace_id

# 需要導入模塊: from inbox.models.backends.generic import GenericAccount [as 別名]
# 或者: from inbox.models.backends.generic.GenericAccount import imap_password [as 別名]
def add_account_with_different_namespace_id(db_session,
                                            email_address='[email protected]'):
    import platform
    from inbox.models.backends.generic import GenericAccount
    from inbox.models import Namespace
    account = GenericAccount(id=11,
                             email_address=email_address,
                             sync_host=platform.node(),
                             provider='yahoo')
    account.imap_password = 'bananagrams'
    account.smtp_password = 'bananagrams'
    account.namespace = Namespace()
    db_session.add(account)
    db_session.commit()
    assert account.namespace.id != account.id
    return account
開發者ID:aabde,項目名稱:sync-engine,代碼行數:18,代碼來源:test_delta_sync.py


注:本文中的inbox.models.backends.generic.GenericAccount.imap_password方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。