def test_inside_holds(self): self.assertEqual(True, lockfuncs.inside(self.char1, self.room1)) self.assertEqual(False, lockfuncs.inside(self.char1, self.room2)) self.assertEqual(True, lockfuncs.holds(self.room1, self.char1)) self.assertEqual(False, lockfuncs.holds(self.room2, self.char1)) # test recursively self.assertEqual(True, lockfuncs.inside_rec(self.char1, self.room1)) self.assertEqual(False, lockfuncs.inside_rec(self.char1, self.room2)) inventory_item = create_object(key="InsideTester", location=self.char1) self.assertEqual(True, lockfuncs.inside_rec(inventory_item, self.room1)) self.assertEqual(False, lockfuncs.inside_rec(inventory_item, self.room2)) inventory_item.delete()
def test_inside_holds(self): self.assertEquals(True, lockfuncs.inside(self.char1, self.room1)) self.assertEquals(False, lockfuncs.inside(self.char1, self.room2)) self.assertEquals(True, lockfuncs.holds(self.room1, self.char1)) self.assertEquals(False, lockfuncs.holds(self.room2, self.char1))
def test_inside_holds(self): self.assertEqual(True, lockfuncs.inside(self.char1, self.room1)) self.assertEqual(False, lockfuncs.inside(self.char1, self.room2)) self.assertEqual(True, lockfuncs.holds(self.room1, self.char1)) self.assertEqual(False, lockfuncs.holds(self.room2, self.char1))