-
Notifications
You must be signed in to change notification settings - Fork 7
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 #3322 from GSA-TTS/main
- Loading branch information
Showing
11 changed files
with
63 additions
and
11 deletions.
There are no files selected for viewing
Binary file added
BIN
+220 KB
...cal_migration/fixtures/workbooks/should_pass/74099-16/additional-eins-workbook-74099.xlsx
Binary file not shown.
Binary file added
BIN
+220 KB
...cal_migration/fixtures/workbooks/should_pass/74099-16/additional-ueis-workbook-74099.xlsx
Binary file not shown.
Binary file added
BIN
+258 KB
...migration/fixtures/workbooks/should_pass/74099-16/audit-findings-text-workbook-74099.xlsx
Binary file not shown.
Binary file added
BIN
+258 KB
...ration/fixtures/workbooks/should_pass/74099-16/corrective-action-plan-workbook-74099.xlsx
Binary file not shown.
Binary file added
BIN
+1.07 MB
...fixtures/workbooks/should_pass/74099-16/federal-awards-audit-findings-workbook-74099.xlsx
Binary file not shown.
Binary file added
BIN
+1.48 MB
...ical_migration/fixtures/workbooks/should_pass/74099-16/federal-awards-workbook-74099.xlsx
Binary file not shown.
Binary file added
BIN
+258 KB
...rical_migration/fixtures/workbooks/should_pass/74099-16/notes-to-sefa-workbook-74099.xlsx
Binary file not shown.
Binary file added
BIN
+288 KB
..._migration/fixtures/workbooks/should_pass/74099-16/secondary-auditors-workbook-74099.xlsx
Binary file not shown.
1 change: 1 addition & 0 deletions
1
...census_historical_migration/fixtures/workbooks/should_pass/74099-16/test-array-74099.json
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
[] |
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
61 changes: 61 additions & 0 deletions
61
backend/census_historical_migration/test_corrective_action_plan_xforms.py
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 |
---|---|---|
@@ -0,0 +1,61 @@ | ||
from django.conf import settings | ||
from django.test import SimpleTestCase | ||
|
||
from .workbooklib.corrective_action_plan import ( | ||
xform_add_placeholder_for_missing_references, | ||
) | ||
|
||
|
||
class TestXformAddPlaceholderForMissingCapText(SimpleTestCase): | ||
class Findings: | ||
def __init__(self, refnum): | ||
self.FINDINGREFNUMS = refnum | ||
|
||
class CapText: | ||
def __init__(self, refnum, seqnum=None, text=None, chartstables=None): | ||
self.FINDINGREFNUMS = refnum | ||
self.SEQ_NUMBER = seqnum | ||
self.TEXT = text | ||
self.CHARTSTABLES = chartstables | ||
|
||
def test_placeholder_addition_for_missing_references(self): | ||
# Setup specific test data | ||
mock_findings = [ | ||
self.Findings("ref1"), | ||
self.Findings("ref2"), | ||
] | ||
mock_findings_texts = [ | ||
self.CapText("ref1", "1", "text1", "chart1"), | ||
] | ||
|
||
findings_texts = xform_add_placeholder_for_missing_references( | ||
mock_findings, mock_findings_texts | ||
) | ||
|
||
self.assertEqual( | ||
len(findings_texts), 2 | ||
) # Expecting two items in findings_texts | ||
self.assertEqual(findings_texts[1].FINDINGREFNUMS, "ref2") | ||
self.assertEqual(findings_texts[1].TEXT, settings.GSA_MIGRATION) | ||
self.assertEqual(findings_texts[1].CHARTSTABLES, settings.GSA_MIGRATION) | ||
|
||
def test_no_placeholder_addition_when_all_references_present(self): | ||
# Setup specific test data | ||
mock_findings = [ | ||
self.Findings("ref1"), | ||
self.Findings("ref2"), | ||
] | ||
mock_findings_texts = [ | ||
self.CapText("ref1", "1", "text1", "chart1"), | ||
self.CapText("ref2", "2", "text2", "chart2"), | ||
] | ||
|
||
findings_texts = xform_add_placeholder_for_missing_references( | ||
mock_findings, mock_findings_texts | ||
) | ||
|
||
self.assertEqual( | ||
len(findings_texts), 2 | ||
) # Expecting two items in findings_texts | ||
self.assertEqual(findings_texts[0].FINDINGREFNUMS, "ref1") | ||
self.assertEqual(findings_texts[1].FINDINGREFNUMS, "ref2") |