def test_add_multiple_items(self): _inventory = {'rope': 1, 'torch': 6} loot = ['torch', 'torch', 'torch'] add_to_inventory(_inventory, loot) self.assertDictEqual(_inventory, {'rope': 1, 'torch': 9})
def test_add_single_item(self): _inventory = {'rope': 1, 'torch': 6} loot = ['torch'] add_to_inventory(_inventory, loot) self.assertDictEqual(_inventory, {'rope': 1, 'torch': 7})