Beispiel #1
0
 def test_should_equal(self):
     q1 = Question(self.source_sentence, self.question, self.answer,
                   self.answer_span, self.question_type)
     q2 = Question(self.source_sentence, self.question, self.answer,
                   self.answer_span, self.question_type)
     self.assertEqual(q1, q2)
Beispiel #2
0
 def test_should_not_equal(self):
     q1 = Question(self.source_sentence, self.question, self.answer,
                   self.answer_span, self.question_type)
     q2 = Question("This is just a test", self.question, self.answer,
                   self.answer_span, self.question_type)
     self.assertNotEqual(q1, q2)
Beispiel #3
0
 def test_instanstiated_object_of_correct_type(self):
     q = Question(self.source_sentence, self.question, self.answer,
                  self.answer_span, self.question_type)
     self.assertIsInstance(q, Question)