Skip to content

Commit

Permalink
Temporarily disable q_code validation (#152)
Browse files Browse the repository at this point in the history
  • Loading branch information
MebinAbraham authored Aug 31, 2022
1 parent 51d00da commit 8ece712
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/validators/answers/answer_validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ def __init__(self, schema_element, questionnaire_schema):
self.questionnaire_schema = questionnaire_schema

def validate(self):
self._validate_q_codes()
# :TODO: Re-introduce once business teams are ready!
# self._validate_q_codes()

return self.errors

Expand Down
5 changes: 5 additions & 0 deletions tests/validators/answers/test_answer_validator.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import pytest

from app.validators.answers import get_answer_validator
from app.validators.answers.answer_validator import AnswerValidator
from app.validators.answers.date_answer_validator import DateAnswerValidator
Expand Down Expand Up @@ -48,6 +50,7 @@ def test_invalid_single_date_period():
assert not answer_validator.is_offset_date_valid()


@pytest.mark.skip(reason="Q Code validation is currently disabled!")
def test_confirmation_question_q_code():
filename = "schemas/valid/test_q_codes.json"
schema = QuestionnaireSchema(_open_and_load_schema_file(filename))
Expand All @@ -67,6 +70,7 @@ def test_confirmation_question_q_code():
assert expected_error_messages == validator.errors


@pytest.mark.skip(reason="Q Code validation is currently disabled!")
def test_data_version_0_0_3_q_code():
# valid schema for test purposes, q_code is injected
filename = "schemas/valid/test_interstitial_instruction.json"
Expand All @@ -87,6 +91,7 @@ def test_data_version_0_0_3_q_code():
assert expected_error_messages == validator.errors


@pytest.mark.skip(reason="Q Code validation is currently disabled!")
def test_invalid_q_codes():
filename = "schemas/invalid/test_invalid_q_code.json"
json_to_validate = _open_and_load_schema_file(filename)
Expand Down

0 comments on commit 8ece712

Please sign in to comment.