本文整理汇总了Python中gaiatest.apps.ui_tests.app.UiTests.launch_standard_sign_in方法的典型用法代码示例。如果您正苦于以下问题:Python UiTests.launch_standard_sign_in方法的具体用法?Python UiTests.launch_standard_sign_in怎么用?Python UiTests.launch_standard_sign_in使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类gaiatest.apps.ui_tests.app.UiTests
的用法示例。
在下文中一共展示了UiTests.launch_standard_sign_in方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_persona_standard_sign_in
# 需要导入模块: from gaiatest.apps.ui_tests.app import UiTests [as 别名]
# 或者: from gaiatest.apps.ui_tests.app.UiTests import launch_standard_sign_in [as 别名]
def test_persona_standard_sign_in(self):
"""
Test standard sign in to UI tests app
"""
uitests = UiTests(self.marionette)
uitests.launch()
uitests.tap_api_button()
uitests.tap_mozId_button()
persona = uitests.launch_standard_sign_in()
persona.login(self.user.email, self.user.password)
uitests.switch_to_mozId_frame()
uitests.wait_for_login_event()
uitests.tap_logout_button()
uitests.wait_for_logout_event()
assertion = uitests.get_assertion()
assertionUtil = AssertionUtil()
unpacked = assertionUtil.unpackAssertion(assertion)
self.assertEqual(AUDIENCE, unpacked['payload']['aud'])
self.assertEqual(self.user.email, unpacked['claim']['principal']['email'])
verified = assertionUtil.verifyAssertion(assertion, AUDIENCE, VERIFIER_URL)
self.assertEqual(verified['status'], 'okay')
self.assertEqual(verified['email'], self.user.email)
self.assertEqual(verified['audience'], AUDIENCE)