本文整理汇总了Python中okcupyd.User.copy方法的典型用法代码示例。如果您正苦于以下问题:Python User.copy方法的具体用法?Python User.copy怎么用?Python User.copy使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类okcupyd.User
的用法示例。
在下文中一共展示了User.copy方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_profile_questions_copy
# 需要导入模块: from okcupyd import User [as 别名]
# 或者: from okcupyd.User import copy [as 别名]
def test_profile_questions_copy(vcr_live_sleep):
# This could be better...
with mock.patch('okcupyd.profile_copy.time.sleep', vcr_live_sleep):
user = User()
# Find a user that has answered fewer than 50 questions.
# This is going to issue an insane number of requests if we don't do this
profile = get_profile_with_max_questions(
user, max_questions=50
)
user.copy(profile).questions()
for question in profile.questions():
assert question.their_answer == question.my_answer
示例2: test_profile_copy_smoke_test
# 需要导入模块: from okcupyd import User [as 别名]
# 或者: from okcupyd.User import copy [as 别名]
def test_profile_copy_smoke_test(vcr_live_sleep):
with mock.patch('okcupyd.profile_copy.time.sleep', vcr_live_sleep):
user = User()
profile = get_profile_with_max_questions(user, 50)
user.copy(profile).all()