本文整理汇总了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()