本文整理汇总了Python中model.user.User.random方法的典型用法代码示例。如果您正苦于以下问题:Python User.random方法的具体用法?Python User.random怎么用?Python User.random使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类model.user.User
的用法示例。
在下文中一共展示了User.random方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_add_user
# 需要导入模块: from model.user import User [as 别名]
# 或者: from model.user.User import random [as 别名]
def test_add_user(app):
new_user = User.random()
app.ensure_login_as(User.Admin())
app.add_user(new_user)
app.logout()
app.login(new_user)
assert app.is_logged_in_as(new_user)
示例2: test_signup_with_valid_credentials
# 需要导入模块: from model.user import User [as 别名]
# 或者: from model.user.User import random [as 别名]
def test_signup_with_valid_credentials(app):
'''
Test sign up with random user's credentials
:param app:
:return:
'''
app.signup(User.random())
app.logout()
示例3: test_login_with_invalid_credentials
# 需要导入模块: from model.user import User [as 别名]
# 或者: from model.user.User import random [as 别名]
def test_login_with_invalid_credentials(app):
'''
Test log in with random credentials. Make sure that log in failed
:param app:
:return:
'''
app.login(User.random())
app.login_failed()
示例4: test_login_with_invalid_credentials
# 需要导入模块: from model.user import User [as 别名]
# 或者: from model.user.User import random [as 别名]
def test_login_with_invalid_credentials(app):
app.ensure_logout()
app.login(User.random())
assert app.is_not_logged_in()
示例5: test_invalid_login
# 需要导入模块: from model.user import User [as 别名]
# 或者: from model.user.User import random [as 别名]
def test_invalid_login(app):
app.ensure_logout()
app.login(User.random())
assert app.is_not_logged_in()
示例6: test_invalid_login
# 需要导入模块: from model.user import User [as 别名]
# 或者: from model.user.User import random [as 别名]
def test_invalid_login(generator_app_for_sauce):
with pytest.allure.step('Inalid login test'):
generator_app_for_sauce.ensure_logout()
generator_app_for_sauce.login(User.random())
assert generator_app_for_sauce.is_not_logged_in()
示例7: test_invalid_login
# 需要导入模块: from model.user import User [as 别名]
# 或者: from model.user.User import random [as 别名]
def test_invalid_login(app):
with pytest.allure.step("Inalid login test"):
app.ensure_logout()
app.login(User.random())
assert app.is_not_logged_in()
示例8: test_login_with_invalid_credential
# 需要导入模块: from model.user import User [as 别名]
# 或者: from model.user.User import random [as 别名]
def test_login_with_invalid_credential(app):
app.go_to_home_page()
app.login(User.random())
assert app.is_not_logged_in()