Skip to content

Commit

Permalink
Re-enable q_codes validation (#157)
Browse files Browse the repository at this point in the history
  • Loading branch information
petechd authored Nov 8, 2022
1 parent 14e2e7f commit a54a5d0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
3 changes: 1 addition & 2 deletions app/validators/answers/answer_validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ def __init__(self, schema_element, questionnaire_schema):
self.questionnaire_schema = questionnaire_schema

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

return self.errors

Expand Down
5 changes: 0 additions & 5 deletions tests/validators/answers/test_answer_validator.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
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 @@ -50,7 +48,6 @@ 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 @@ -70,7 +67,6 @@ 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 @@ -91,7 +87,6 @@ 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 a54a5d0

Please sign in to comment.