Skip to content

Commit

Permalink
[#190] fix schema enum tests
Browse files Browse the repository at this point in the history
  • Loading branch information
marisahoenig committed Oct 9, 2020
1 parent fff3a52 commit a6f11c9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/app/v2/notifications/test_notification_schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def test_post_sms_json_schema_missing_va_identifier_required_fields(va_identifie
'message': "va_identifier " + key_name + " is a required property"} in error['errors']


@pytest.mark.parametrize("va_identifier_type", VA_IDENTIFIER_TYPES + ["invalid_id_type"])
@pytest.mark.parametrize("va_identifier_type", VA_IDENTIFIER_TYPES + ["INVALID"])
def test_post_sms_schema_id_type_should_only_use_enum_values(va_identifier_type):
id_type_as_parameter_json = {
"va_identifier": {
Expand All @@ -203,7 +203,7 @@ def test_post_sms_schema_id_type_should_only_use_enum_values(va_identifier_type)
assert error.get('status_code') == 400
assert len(error.get('errors')) == 1
assert {'error': 'ValidationError',
'message': "va_identifier invalid_id_type is not one of [va_profile_id, pid, icn]"} in error['errors']
'message': "va_identifier INVALID is not one of [VAPROFILEID, PID, ICN]"} in error['errors']


def test_post_sms_json_schema_bad_uuid_and_missing_phone_number_and_va_identifier():
Expand Down Expand Up @@ -352,7 +352,7 @@ def test_post_email_json_schema_missing_va_identifier_required_fields(va_identif
'message': "va_identifier " + key_name + " is a required property"} in error['errors']


@pytest.mark.parametrize("va_identifier_type", VA_IDENTIFIER_TYPES + ["invalid_id_type"])
@pytest.mark.parametrize("va_identifier_type", VA_IDENTIFIER_TYPES + ["INVALID"])
def test_post_email_schema_id_type_should_only_use_enum_values(va_identifier_type):
id_type_as_parameter_json = {
"va_identifier": {
Expand All @@ -371,7 +371,7 @@ def test_post_email_schema_id_type_should_only_use_enum_values(va_identifier_typ
assert error.get('status_code') == 400
assert len(error.get('errors')) == 1
assert {'error': 'ValidationError',
'message': "va_identifier invalid_id_type is not one of [va_profile_id, pid, icn]"} in error['errors']
'message': "va_identifier INVALID is not one of [VAPROFILEID, PID, ICN]"} in error['errors']


def valid_email_response():
Expand Down

0 comments on commit a6f11c9

Please sign in to comment.