Ignore:
Timestamp:
12/07/09 01:59:14 (10 years ago)
Author:
b0rland_parpg
Message:

Ticket #107: patch by b0rland
Extended inventory with findByID method. Added tests.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/game/tests/test_inventory.py

    r424 r436  
    6969        self.assertTrue(self.item2 in self.inventory.getItemsInSlot("neck").values()) 
    7070        self.assertFalse(self.item in self.inventory.getItemsInSlot("neck").values()) 
     71 
     72    def testFind(self): 
     73        self.inventory.placeItem(self.item) 
     74        self.assertEqual(self.inventory.findItemByID(12), self.item) 
     75        self.assertEqual(self.inventory.findItemByID(13), None) 
     76 
    7177         
    7278if __name__ == '__main__': 
Note: See TracChangeset for help on using the changeset viewer.