예제 #1
0
    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]))
예제 #2
0
    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]))
예제 #3
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)))
예제 #4
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)))