def test_answer_in_choices(self): test = Create('aquiz', 3) test.add_question("What colour is the sky?", 1, {"B": "BLUE"}, { "A": "RED", "B": "BLUE", "C": "GREEN" }) self.assertTrue(test.quiz.questions[0].answers["B"] == test.quiz.questions[0].choices["B"])
def test_answer_in_choices(self): test = Create('aquiz', 3) test.add_question('What colour is the sky?', 1, {'B':'BLUE'}, {'A':'RED', 'B':'BLUE', 'C':'GREEN'}) self.assertTrue(test.quiz.questions[0].answers['B'] == test.quiz.questions[0].choices['B'])
def test_question_options_not_empty(self): '''Test if the question is added to the list.''' test = Create('aquiz', 3) test.add_question('What colour is the sky?', 1,{}, {}) self.assertFalse(test.quiz.questions[0].answers)
def test_question_options_not_empty(self): """Test if the question is added to the list.""" test = Create("aquiz", 3) test.add_question("What colour is the sky?", 1, {}, {}) self.assertFalse(test.quiz.questions[0].answers)