Skip to content

Commit

Permalink
[#190] cleans up some test values for notification schema tests
Browse files Browse the repository at this point in the history
  • Loading branch information
marisahoenig committed Oct 8, 2020
1 parent cad01dd commit f320654
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/app/v2/notifications/test_notification_schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def test_post_sms_json_schema_bad_uuid(template_id):

missing_id_type_json = {"value": "bar"}
missing_value_json = {"id_type": VA_PROFILE_ID}
missing_id_type_and_value_json = {"invalid_param": "invalid"}
missing_id_type_and_value_json = {}


@pytest.mark.parametrize('va_identifier, missing_key_name', [
Expand All @@ -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 + ["foo"])
@pytest.mark.parametrize("va_identifier_type", VA_IDENTIFIER_TYPES + ["invalid_id_type"])
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 foo is not one of [va_profile_id, pid, icn]"} in error['errors']
'message': "va_identifier invalid_id_type is not one of [va_profile_id, pid, icn]"} in error['errors']


def test_post_sms_json_schema_bad_uuid_and_missing_phone_number_and_va_identifier():
Expand Down Expand Up @@ -328,7 +328,7 @@ def test_post_email_schema_invalid_email_address(email_address, err_msg):

missing_id_type_json = {"value": "bar"}
missing_value_json = {"id_type": VA_PROFILE_ID}
missing_id_type_and_value_json = {"invalid_param": "invalid"}
missing_id_type_and_value_json = {}


@pytest.mark.parametrize('va_identifier, missing_key_name', [
Expand All @@ -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 + ["foo"])
@pytest.mark.parametrize("va_identifier_type", VA_IDENTIFIER_TYPES + ["invalid_id_type"])
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 foo is not one of [va_profile_id, pid, icn]"} in error['errors']
'message': "va_identifier invalid_id_type is not one of [va_profile_id, pid, icn]"} in error['errors']


def valid_email_response():
Expand Down

0 comments on commit f320654

Please sign in to comment.