EduploneExam/tests testResponse.py,1.3,1.4
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-serv2778/tests
Modified Files:
testResponse.py
Log Message:
fixed some test
Index: testResponse.py
===================================================================
RCS file: /cvsroot/eduplone/EduploneExam/tests/testResponse.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** testResponse.py 15 Dec 2004 11:37:49 -0000 1.3
--- testResponse.py 15 Dec 2004 11:55:27 -0000 1.4
***************
*** 24,41 ****
self.rObj=self.folder.responseObj
! def makeQuestion(self):
self.folder.invokeFactory('ExamFolder', 'examfolder')
self.folder.examfolder.invokeFactory('MultipleChoiceQuestion', 'question')
self.qObj=self.folder.examfolder.question
#testing
def testSetGetQuestion(self):
! self.makeQuestion()
self.rObj.setQuestion(self.qObj)
getObj=self.rObj.getQuestion()
self.failUnless(self.qObj.UID()==getObj.UID())
def testGetQuestionTitle(self):
! self.makeQuestion()
self.qObj.setTitle('the title')
self.rObj.setQuestion(self.qObj)
--- 24,48 ----
self.rObj=self.folder.responseObj
! def makeQuestionContext(self):
self.folder.invokeFactory('ExamFolder', 'examfolder')
self.folder.examfolder.invokeFactory('MultipleChoiceQuestion', 'question')
self.qObj=self.folder.examfolder.question
+ self.cObj=self.folder.examfolder
#testing
def testSetGetQuestion(self):
! self.makeQuestionContext()
self.rObj.setQuestion(self.qObj)
getObj=self.rObj.getQuestion()
self.failUnless(self.qObj.UID()==getObj.UID())
+ def testSetGetContext(self):
+ self.makeQuestionContext()
+ self.rObj.setContext(self.cObj)
+ getObj=self.rObj.getContext()
+ self.failUnless(self.cObj.UID()==getObj.UID())
+
def testGetQuestionTitle(self):
! self.makeQuestionContext()
self.qObj.setTitle('the title')
self.rObj.setQuestion(self.qObj)
***************
*** 44,48 ****
def testGetQuestionType(self):
! self.makeQuestion()
self.rObj.setQuestion(self.qObj)
typ=self.rObj.getQuestionType()
--- 51,55 ----
def testGetQuestionType(self):
! self.makeQuestionContext()
self.rObj.setQuestion(self.qObj)
typ=self.rObj.getQuestionType()
***************
*** 61,65 ****
def testGetMaxScore(self):
! self.makeQuestion()
self.qObj.setMaxScore(10.2)
self.rObj.setQuestion(self.qObj)
--- 68,72 ----
def testGetMaxScore(self):
! self.makeQuestionContext()
self.qObj.setMaxScore(10.2)
self.rObj.setQuestion(self.qObj)
-------------------------------------------------------
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/