def test_add_one_item(self): self.assertEqual(add_items({ "wood": 4, "iron": 2 }, ["iron", "iron"]), { "wood": 4, "iron": 4 })
def test_add_new_item(self): self.assertEqual( add_items({ "iron": 1, "diamond": 2 }, ["iron", "wood", "wood"]), { "iron": 2, "diamond": 2, "wood": 2 })
def test_add_multiple_items(self): self.assertEqual( add_items({ "wood": 2, "gold": 1, "diamond": 3 }, ["wood", "gold", "gold"]), { "wood": 3, "gold": 3, "diamond": 3 })
def test_add_from_empty_dict(self): self.assertEqual(add_items({}, ["iron", "iron", "diamond"]), { "iron": 2, "diamond": 1 })