EduploneExam/tests testRegistry.py,1.2,1.3
Jens Klein <[email protected]>
| Newsgroups | gmane.comp.web.zope.eduplone.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/eduplone/EduploneExam/tests
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24013/tests
Modified Files:
testRegistry.py
Log Message:
test ExamFolders invoke Factory magic
Index: testRegistry.py
===================================================================
RCS file: /cvsroot/eduplone/EduploneExam/tests/testRegistry.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** testRegistry.py 14 Dec 2004 13:09:59 -0000 1.2
--- testRegistry.py 14 Dec 2004 15:22:53 -0000 1.3
***************
*** 21,24 ****
--- 21,25 ----
class dummyclasspositive(BaseContent):
__implements__ = (IExamQuestion,)
+ meta_type = portal_type = archetype_name = 'dummyclasspositive'
def processResponse():
***************
*** 33,37 ****
def afterSetUp(self):
! pass
def testRegisterImplementingClass(self):
--- 34,38 ----
def afterSetUp(self):
! common.installWithinPortal(self.portal)
def testRegisterImplementingClass(self):
***************
*** 52,55 ****
--- 53,63 ----
raise AssertionError('registry should raise NotImplementedError!')
+ def testExamFolderInvokeFactory(self):
+ self.loginPortalOwner()
+ registerQuestionType(dummyclasspositive)
+ self.folder.invokeFactory('ExamFolder', 'exam')
+ self.folder.exam.invokeFactory('TrueFalseQuestion','testdummy')
+ self.failUnless('testdummy' in self.folder.exam.contentIds())
+
def test_suite():
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/