def test_get_contents(self): obj = self.portal.folder contents = api.get_contents(obj) # see base.py - we have 50 documents in there self.assertEqual(len(contents), 50) # we return always brains self.assertTrue(api.is_brain(contents[0]))
def test_is_brain(self): brain = self.get_document_brain() self.assertTrue(api.is_brain(brain)) self.assertFalse(api.is_brain(api.get_object(brain)))