-
Notifications
You must be signed in to change notification settings - Fork 9
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 #3073 from GSA-TTS/main
- Loading branch information
Showing
20 changed files
with
208 additions
and
97 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
Binary file added
BIN
+803 KB
backend/audit/fixtures/workbooks/should_pass/cluster_names/tests-cluster-names.xlsx
Binary file not shown.
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 |
---|---|---|
|
@@ -13,6 +13,7 @@ | |
LateChangeError, | ||
SingleAuditChecklist, | ||
SingleAuditReportFile, | ||
SubmissionEvent, | ||
User, | ||
generate_sac_report_id, | ||
) | ||
|
@@ -195,6 +196,33 @@ def test_multiple_certifying_auditor_contact_not_allowed(self): | |
role="certifying_auditor_contact", | ||
) | ||
|
||
def test_access_creation_non_unique_emails(self): | ||
""" | ||
If we attempt to create an Access for an email that has | ||
multiple User objects associated with it, we should not | ||
assign the Access to any specific User object and instead | ||
leave the Access unclaimed. This way, the next time the | ||
user logs into the FAC, the Access will be claimed by | ||
whichever User account is the "active" one. | ||
""" | ||
creator = baker.make(User) | ||
|
||
baker.make(User, email="[email protected]") | ||
baker.make(User, email="[email protected]") | ||
|
||
sac = baker.make(SingleAuditChecklist) | ||
|
||
access = Access.objects.create( | ||
sac=sac, | ||
role="editor", | ||
email="[email protected]", | ||
event_user=creator, | ||
event_type=SubmissionEvent.EventType.ACCESS_GRANTED, | ||
) | ||
|
||
self.assertEqual(access.email, "[email protected]") | ||
self.assertIsNone(access.user) | ||
|
||
|
||
class ExcelFileTests(TestCase): | ||
"""Model tests""" | ||
|
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
Oops, something went wrong.