make inventory maps proxy items and containers propxy inventories
This commit is contained in:
@@ -165,11 +165,11 @@ def test_containers(db, carl):
|
||||
db.add_or_update([carl, ten_foot_pole, bag_of_holding])
|
||||
|
||||
# add the ten_foot_pole to the bag of holding
|
||||
assert bag_of_holding.inventory.add(ten_foot_pole)
|
||||
assert bag_of_holding.add(ten_foot_pole)
|
||||
db.add_or_update(bag_of_holding)
|
||||
pole_from_bag = bag_of_holding.inventory.get(ten_foot_pole)
|
||||
assert pole_from_bag
|
||||
assert pole_from_bag in bag_of_holding.inventory
|
||||
pole_from_bag = bag_of_holding.get(ten_foot_pole)
|
||||
assert pole_from_bag.item == ten_foot_pole
|
||||
assert pole_from_bag in bag_of_holding
|
||||
assert pole_from_bag not in carl.equipment
|
||||
|
||||
# add the bag of holding to carl's equipment
|
||||
@@ -183,4 +183,4 @@ def test_containers(db, carl):
|
||||
assert carls_pole == pole_from_bag
|
||||
|
||||
# remove the pole from the bag
|
||||
assert carls_bag.item.inventory.remove(pole_from_bag)
|
||||
assert carls_bag.remove(pole_from_bag)
|
||||
|
||||
Reference in New Issue
Block a user