resolve warnings

This commit is contained in:
evilchili
2024-08-21 14:14:37 -07:00
parent 9f75630c74
commit 5d9fde949d
5 changed files with 24 additions and 11 deletions
+1 -1
View File
@@ -9,7 +9,7 @@ def test_dump_load(db, bootstrap):
# clear the database and reinitialize
db.metadata.drop_all(bind=db.engine)
db.init()
db.metadata.create_all(db.engine)
# load the dump
db.load(data)
-2
View File
@@ -96,8 +96,6 @@ def test_spell_slots(db, carl, wizard):
db.add_or_update(carl)
# verify carl has the spell slots granted by wizard at 1st level
print(carl.levels)
print(carl.spell_slots)
assert len(carl.spell_slots) == 2
assert carl.spell_slots[0].spell_level == 1
assert carl.spell_slots[1].spell_level == 1
+3 -5
View File
@@ -1,5 +1,5 @@
from ttfrog.db.schema.constants import DamageType, Defenses
from ttfrog.db.schema.item import Item, ItemType, Rarity, Weapon
from ttfrog.db.schema.item import Armor, Rarity, Shield, Weapon
from ttfrog.db.schema.modifiers import Modifier
@@ -42,14 +42,13 @@ def test_weapons(db):
def test_attunement(db, carl):
with db.transaction():
helm = Item(
helm = Armor(
name="Iron Helm",
item_type=ItemType.ARMOR,
rarity=Rarity.Common,
)
helm.add_modifier(Modifier("+1 AC (helmet)", target="armor_class", relative_value=1, stacks=True))
shield = Item(
shield = Shield(
name="Shield of Missile Attraction",
description="""
While holding this shield, you have resistance to damage from ranged weapon attacks.
@@ -58,7 +57,6 @@ def test_attunement(db, carl):
or similar magic. Removing the shield fails to end the curse on you. Whenever a ranged weapon attack is made
against a target within 10 feet of you, the curse causes you to become the target instead.
""",
item_type=ItemType.SHIELD,
rarity=Rarity.Rare,
requires_attunement=True,
)