本文整理汇总了Python中the_tale.game.pvp.prototypes.Battle1x1Prototype.get_by_enemy_id方法的典型用法代码示例。如果您正苦于以下问题:Python Battle1x1Prototype.get_by_enemy_id方法的具体用法?Python Battle1x1Prototype.get_by_enemy_id怎么用?Python Battle1x1Prototype.get_by_enemy_id使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类the_tale.game.pvp.prototypes.Battle1x1Prototype
的用法示例。
在下文中一共展示了Battle1x1Prototype.get_by_enemy_id方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_1_process_success
# 需要导入模块: from the_tale.game.pvp.prototypes import Battle1x1Prototype [as 别名]
# 或者: from the_tale.game.pvp.prototypes.Battle1x1Prototype import get_by_enemy_id [as 别名]
def test_1_process_success(self):
self.assertEqual(SupervisorTask.objects.all().count(), 0)
self.assertTrue(self.accept_battle().is_PROCESSED)
self.assertEqual(SupervisorTask.objects.all().count(), 1)
self.assertEqual(Battle1x1Prototype.get_by_id(self.battle.id).enemy_id, self.account_2.id)
self.assertEqual(Battle1x1Prototype.get_by_enemy_id(self.account_2.id).account_id, self.account_1.id)
示例2: test_process_success_when_initiator_already_has_battle_object
# 需要导入模块: from the_tale.game.pvp.prototypes import Battle1x1Prototype [as 别名]
# 或者: from the_tale.game.pvp.prototypes.Battle1x1Prototype import get_by_enemy_id [as 别名]
def test_process_success_when_initiator_already_has_battle_object(self):
self.pvp_balancer.add_to_arena_queue(self.hero_2.id)
self.assertEqual(SupervisorTask.objects.all().count(), 0)
self.assertTrue(self.accept_battle().is_PROCESSED)
self.assertEqual(SupervisorTask.objects.all().count(), 1)
self.assertEqual(Battle1x1Prototype.get_by_id(self.battle.id).enemy_id, self.account_2.id)
self.assertEqual(Battle1x1Prototype.get_by_enemy_id(self.account_2.id).account_id, self.account_1.id)