예제 #1
0
class TestQuizQuestion:
    def setup_method(self, method):
        self.question = Question('2 + 2', '4')

    def test_creation(self):
        assert isinstance(self.question, Question)

    def test_check_answer(self):
        assert self.question.check_answer('4')

    def test_check_answer_incorrect(self):
        assert not self.question.check_answer('53')
예제 #2
0
 def setup_method(self, method):
     self.question = Question('2 + 2', '4')