本文整理汇总了Python中models.Move.get方法的典型用法代码示例。如果您正苦于以下问题:Python Move.get方法的具体用法?Python Move.get怎么用?Python Move.get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类models.Move
的用法示例。
在下文中一共展示了Move.get方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_moves_2
# 需要导入模块: from models import Move [as 别名]
# 或者: from models.Move import get [as 别名]
def test_moves_2(self):
move = Move.get("Pound")
p = {c.name: getattr(move, c.name) for c in move.__table__.columns}
self.assertEqual(p["MOVE_ID"], 1)
self.assertEqual(p["MOVE_NAME"], "Pound")
self.assertEqual(p["MOVE_POWER"], 40)
self.assertEqual(p["MOVE_ACCURACY"], 100)
self.assertEqual(p["MOVE_PP"], 35)
示例2: test_moves_4
# 需要导入模块: from models import Move [as 别名]
# 或者: from models.Move import get [as 别名]
def test_moves_4(self):
move = Move.get("Water-pulse")
p = {c.name: getattr(move, c.name) for c in move.__table__.columns}
self.assertEqual(p["MOVE_ID"], 352)
self.assertEqual(p["MOVE_NAME"], "Water-pulse")
self.assertEqual(p["MOVE_TYPE"], "Water")
self.assertEqual(p["MOVE_CATEGORY"], "Special")
self.assertEqual(p["MOVE_POWER"], 60)
self.assertEqual(p["MOVE_ACCURACY"], 100)
self.assertEqual(p["MOVE_PP"], 20)
self.assertEqual(p["MOVE_DESCRIPTION"], "Inflicts regular damage. Has a 20% chance to confuse the target.")
示例3: test_moves_6
# 需要导入模块: from models import Move [as 别名]
# 或者: from models.Move import get [as 别名]
def test_moves_6(self):
move = Move.get("Psychic")
p = {c.name: getattr(move, c.name) for c in move.__table__.columns}
self.assertEqual(p["MOVE_ID"], 94)
self.assertEqual(p["MOVE_NAME"], "Psychic")
self.assertEqual(p["MOVE_TYPE"], "Psychic")
self.assertEqual(p["MOVE_CATEGORY"], "Special")
self.assertEqual(p["MOVE_POWER"], 90)
self.assertEqual(p["MOVE_ACCURACY"], 100)
self.assertEqual(p["MOVE_PP"], 10)
self.assertEqual(
p["MOVE_DESCRIPTION"],
"Inflicts regular damage. Has a 10% chance to lower the target's Special Defense by one stage.",
)
示例4: test_moves_5
# 需要导入模块: from models import Move [as 别名]
# 或者: from models.Move import get [as 别名]
def test_moves_5(self):
move = Move.get("Aurora-beam")
p = {c.name: getattr(move, c.name) for c in move.__table__.columns}
self.assertEqual(p["MOVE_ID"], 62)
self.assertEqual(p["MOVE_NAME"], "Aurora-beam")
self.assertEqual(p["MOVE_TYPE"], "Ice")
self.assertEqual(p["MOVE_CATEGORY"], "Special")
self.assertEqual(p["MOVE_POWER"], 65)
self.assertEqual(p["MOVE_ACCURACY"], 100)
self.assertEqual(p["MOVE_PP"], 20)
self.assertEqual(
p["MOVE_DESCRIPTION"],
"Inflicts regular damage. Has a 10% chance to lower the target's Attack by one stage.",
)