def METHOD_NAME(db):
    question = Question.objects.first()
    question.questionset.section.locked = True
    question.questionset.section.save()
    validator = QuestionLockedValidator()
    validator.set_context(QuestionSerializer(instance=question))
    with pytest.raises(RestFameworkValidationError):
        validator({
            'questionset': question.questionset,
            'locked': True
        })