Пример #1
0
 def test_answer_is_among_options(self):
     question = get_question()
     test = []
     for option in get_options(question):
         q = db.session.query(Answer).filter(Answer.description == str(option)).first()
         test.append(q.question_id)
     self.assertTrue(question.question_id in test)
Пример #2
0
 def test_answer_list_is_unique(self):
     question = get_question()
     self.assertEqual(len(set(get_options(question))),3)