-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3258 from GSA-TTS/main
- Loading branch information
Showing
11 changed files
with
83 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,7 @@ | |
xform_country, | ||
xform_entity_type, | ||
xform_replace_empty_auditor_email, | ||
xform_replace_empty_auditee_email, | ||
) | ||
from .exception_utils import ( | ||
DataMigrationError, | ||
|
@@ -240,3 +241,23 @@ def test_missing_auditor_email(self): | |
input_data = {} | ||
expected_output = {"auditor_email": settings.GSA_MIGRATION} | ||
self.assertEqual(xform_replace_empty_auditor_email(input_data), expected_output) | ||
|
||
|
||
class TestXformReplaceEmptyAuditeeEmail(SimpleTestCase): | ||
def test_empty_auditee_email(self): | ||
"""Test that an empty auditee_email is replaced with 'GSA_MIGRATION'""" | ||
input_data = {"auditee_email": ""} | ||
expected_output = {"auditee_email": settings.GSA_MIGRATION} | ||
self.assertEqual(xform_replace_empty_auditee_email(input_data), expected_output) | ||
|
||
def test_non_empty_auditee_email(self): | ||
"""Test that a non-empty auditee_email remains unchanged""" | ||
input_data = {"auditee_email": "[email protected]"} | ||
expected_output = {"auditee_email": "[email protected]"} | ||
self.assertEqual(xform_replace_empty_auditee_email(input_data), expected_output) | ||
|
||
def test_missing_auditee_email(self): | ||
"""Test that a missing auditee_email key is added and set to 'GSA_MIGRATION'""" | ||
input_data = {} | ||
expected_output = {"auditee_email": settings.GSA_MIGRATION} | ||
self.assertEqual(xform_replace_empty_auditee_email(input_data), expected_output) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters