EduploneExam/tests testResponse.py,1.6,1.7
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-serv2254/tests
Modified Files:
testResponse.py
Log Message:
added response for session storage
Index: testResponse.py
===================================================================
RCS file: /cvsroot/eduplone/EduploneExam/tests/testResponse.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** testResponse.py 15 Dec 2004 13:56:04 -0000 1.6
--- testResponse.py 16 Dec 2004 11:01:21 -0000 1.7
***************
*** 14,20 ****
common.installProducts()
! from Products.EduploneExam.userresponses import SimpleResponse
! class TestResponse(PloneTestCase.PloneTestCase):
def afterSetUp(self):
--- 14,20 ----
common.installProducts()
! from Products.EduploneExam.userresponses.SessionResponse import SessionResponse
! class TestSimpleResponse(PloneTestCase.PloneTestCase):
def afterSetUp(self):
***************
*** 34,38 ****
self.makeQuestionContext()
self.rObj.setQuestion(self.qObj)
! getObj=self.rObj.getQuestion()
self.failUnless(self.qObj.UID()==getObj.UID())
--- 34,38 ----
self.makeQuestionContext()
self.rObj.setQuestion(self.qObj)
! getObj=self.rObj.getQuestion(self.portal)
self.failUnless(self.qObj.UID()==getObj.UID())
***************
*** 40,44 ****
self.makeQuestionContext()
self.rObj.setContext(self.cObj)
! getObj=self.rObj.getContext()
self.failUnless(self.cObj.UID()==getObj.UID())
--- 40,44 ----
self.makeQuestionContext()
self.rObj.setContext(self.cObj)
! getObj=self.rObj.getContext(self.portal)
self.failUnless(self.cObj.UID()==getObj.UID())
***************
*** 89,96 ****
pass
def test_suite():
from unittest import TestSuite, makeSuite
suite = TestSuite()
! suite.addTest(makeSuite(TestResponse))
return suite
--- 89,105 ----
pass
+ class TestSessionResponse(TestSimpleResponse):
+
+ def afterSetUp(self):
+ self.loginPortalOwner()
+ common.installWithinPortal(self.portal)
+ self.rObj = SessionResponse()
+
+
def test_suite():
from unittest import TestSuite, makeSuite
suite = TestSuite()
! suite.addTest(makeSuite(TestSimpleResponse))
! suite.addTest(makeSuite(TestSessionResponse))
return 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/