Esempio n. 1
0
 def test_Exam_addQuestion_bad_question(self):
     myExam = Exam()
     try:
         myExam.addQuestion(self.myBadQuestion)
     except ValueError:
         pass
         # When input is bad, nothing should be added.
     self.assertEqual(myExam.getQuestions(), [])
Esempio n. 2
0
 def test_Exam_addQuestion_good_question(self):
     myExam = Exam()
     myExam.addQuestion(self.myGoodQuestion)
     self.assertEqual(myExam.getQuestions(), [self.myGoodQuestion])