EduploneExam/tests testResponse.py,1.5,1.6

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-serv28488/tests

Modified Files:
	testResponse.py 
Log Message:
rebuild and SimpleResponse works now


Index: testResponse.py
===================================================================
RCS file: /cvsroot/eduplone/EduploneExam/tests/testResponse.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** testResponse.py	15 Dec 2004 12:11:44 -0000	1.5
--- testResponse.py	15 Dec 2004 13:56:04 -0000	1.6
***************
*** 56,65 ****
          self.failUnless(typ==self.qObj.getQuestionType())
  
-     def testSetResponseValues(self):
-         pass
- 
-     def testGetResponseValues(self):
-         pass
- 
      def testSetGetScore(self):
          self.rObj.setScore(10.5)
--- 56,59 ----
***************
*** 74,77 ****
--- 68,91 ----
          self.failUnless(mScore==10)
  
+     def testSetGetResponseValues(self):
+         testdict = {
+             '1'  : 1,
+             '1%s': 'Lorem ipsum dolor',
+         }
+         self.rObj.setResponseValues(**testdict)
+         getresp = self.rObj.getResponseValues()
+         self.failUnless(getresp.has_key('1'))
+         self.failUnless(getresp.has_key('1%s'))
+         self.failUnless(getresp['1']==1)
+         self.failUnless(getresp['1%s']=='Lorem ipsum dolor')
+ 
+         self.failUnless(self.rObj['1']==1)
+         self.failUnless(self.rObj['1%s']=='Lorem ipsum dolor')
+ 
+         try:
+             a=self.rObj['wrong']
+             self.fail()
+         except KeyError:
+             pass
  
  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/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.