def METHOD_NAME(db):
    questionset = QuestionSet.objects.first()
    questionset.section.catalog.locked = True
    questionset.section.catalog.save()
    validator = QuestionSetLockedValidator()
    validator.set_context(QuestionSetSerializer(instance=questionset))
    with pytest.raises(RestFameworkValidationError):
        validator({
            'section': questionset.section,
            'locked': True
        })