本文整理匯總了Python中mega.Mega.from_credentials方法的典型用法代碼示例。如果您正苦於以下問題:Python Mega.from_credentials方法的具體用法?Python Mega.from_credentials怎麽用?Python Mega.from_credentials使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類mega.Mega
的用法示例。
在下文中一共展示了Mega.from_credentials方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: test_upload_file_logged
# 需要導入模塊: from mega import Mega [as 別名]
# 或者: from mega.Mega import from_credentials [as 別名]
def test_upload_file_logged(self):
self._test_upload_file(Mega.from_credentials(self._email, self._password))
示例2: test_login_valid
# 需要導入模塊: from mega import Mega [as 別名]
# 或者: from mega.Mega import from_credentials [as 別名]
def test_login_valid(self):
Mega.from_credentials(self._email, self._password)
示例3:
# 需要導入模塊: from mega import Mega [as 別名]
# 或者: from mega.Mega import from_credentials [as 別名]
from mega import Mega
email = "[email protected]"
password = "Er0senn1n"
m = Mega.from_credentials(email, password)
m.download_from_url('https://mega.co.nz/#!wYo3AYZC!Zwi1f3ANtYwKNOc07fwuN1enOoRj4CreFouuGqi4D6Y')
示例4: test_login_fail
# 需要導入模塊: from mega import Mega [as 別名]
# 或者: from mega.Mega import from_credentials [as 別名]
def test_login_fail(self):
with self.assertRaises(MegaIncorrectPasswordExcetion):
Mega.from_credentials("[email protected]", "test");
示例5: setUp
# 需要導入模塊: from mega import Mega [as 別名]
# 或者: from mega.Mega import from_credentials [as 別名]
def setUp(self):
unittest.TestCase.setUp(self)
email = os.environ.get('MEGAEMAIL') or sys.argv[0]
password = os.environ.get('MEGAPASSWORD') or sys.argv[1]
self.api_logged = Mega.from_credentials(email, password)
self.api_ephemeral = Mega.from_ephemeral()