本文整理匯總了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
示例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
示例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