本文整理匯總了Python中test_factory.Factory.tag_person方法的典型用法代碼示例。如果您正苦於以下問題:Python Factory.tag_person方法的具體用法?Python Factory.tag_person怎麽用?Python Factory.tag_person使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類test_factory.Factory
的用法示例。
在下文中一共展示了Factory.tag_person方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: test_challenge_has_added_board
# 需要導入模塊: from test_factory import Factory [as 別名]
# 或者: from test_factory.Factory import tag_person [as 別名]
def test_challenge_has_added_board(self):
Factory.tag(self.a1, name="Board of Directors")
bg = Factory.group(self.a1,"board of directors")
Factory.grouprule(self.a1, "have any tag that","contains","Board of Directors", group=bg)
Factory.tag_person(self.a1, tag_name="Board of Directors")
self.a1.check_challenge_progress()
assert self.a1.challenge_has_added_board == True
示例2: test_challenge_has_set_up_tags
# 需要導入模塊: from test_factory import Factory [as 別名]
# 或者: from test_factory.Factory import tag_person [as 別名]
def test_challenge_has_set_up_tags(self):
# needed since the setup creates some and I don't want to add it to all the other tests.
Tag.objects_by_account(self.a1).delete()
self.a1.check_challenge_progress()
assert self.a1.challenge_has_set_up_tags == False
Factory.tag_person(self.a1)
self.a1.check_challenge_progress()
assert self.a1.challenge_has_set_up_tags == True