CMSgov / bluebutton-web-server

Blue Button API
https://sandbox.bluebutton.cms.gov
Other
40 stars 24 forks source link

BB2-3312: Updated ApplicationSerializer to swap support email for contacts. #1236

Closed loganbertram closed 1 month ago

loganbertram commented 1 month ago

JIRA Ticket: BB2-3312

What Does This PR Do?

Update ApplicationSerializer to swap support email for contacts without changing field names. This is necessary because we always expect to see the value in the support_email field where data from this serializer is utilized.

What Should Reviewers Watch For?

If you're reviewing this PR, please check for these things in particular:

You won't be able to live demo this on the medicare.gov site, so note that the new serializer test passes and that existing tests implementing the endpoint (apps.dot_ext.tests.test_views.TestTokenView) still pass. These tests never checked real emails, but it does validate that the response when support_email is empty is an empty string rather than None. That behavior is shown to be consistent by this test.

Validation

Unit tests pass and the serialized response is what we expect. We won't be able to test visually until deployed to higher environments to test on medicare.gov. We should build a tool for testing this kind of change in the future.

What Security Implications Does This PR Have?

Please indicate if this PR does any of the following:

Any Migrations?