-
Notifications
You must be signed in to change notification settings - Fork 19
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 #3276 from cisagov/ag/3255-domain-reports-take-three
#3255 - CSV Export fixes
- Loading branch information
Showing
3 changed files
with
117 additions
and
144 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ | |
DomainDataType, | ||
DomainDataFederal, | ||
DomainDataTypeUser, | ||
DomainRequestsDataType, | ||
DomainRequestDataType, | ||
DomainGrowth, | ||
DomainManaged, | ||
DomainUnmanaged, | ||
|
@@ -456,11 +456,11 @@ def test_domain_request_data_type_user_with_portfolio(self): | |
portfolio.delete() | ||
|
||
def _run_domain_request_data_type_user_export(self, request): | ||
"""Helper function to run the exporting_dr_data_to_csv function on DomainRequestsDataType""" | ||
"""Helper function to run the export_data_to_csv function on DomainRequestDataType""" | ||
|
||
csv_file = StringIO() | ||
|
||
DomainRequestsDataType.exporting_dr_data_to_csv(csv_file, request=request) | ||
DomainRequestDataType.export_data_to_csv(csv_file, request=request) | ||
|
||
csv_file.seek(0) | ||
|
||
|
@@ -773,9 +773,9 @@ def test_domain_request_data_full(self): | |
# Content | ||
"city5.gov,Approved,Federal,Executive,,Testorg,N/A,,NY,2,,,,1,0,city1.gov,Testy,Tester,[email protected]," | ||
"Chief Tester,Purpose of the site,There is more,Testy Tester [email protected],,city.com,\n" | ||
"city2.gov,In review,Federal,Executive,Portfolio 1 Federal Agency,,N/A,,,2,,,,0,1,city1.gov,,,,," | ||
"city2.gov,In review,Federal,Executive,Portfolio 1 Federal Agency,,N/A,,NY,2,,,,0,1,city1.gov,,,,," | ||
"Purpose of the site,There is more,Testy Tester [email protected],,city.com,\n" | ||
"city3.gov,Submitted,Federal,Executive,Portfolio 1 Federal Agency,,N/A,,,2,,,,0,1," | ||
"city3.gov,Submitted,Federal,Executive,Portfolio 1 Federal Agency,,N/A,,NY,2,,,,0,1," | ||
'"cheeseville.gov, city1.gov, igorville.gov",,,,,Purpose of the site,CISA-first-name CISA-last-name | ' | ||
'There is more,"Meow Tester24 [email protected], Testy1232 Tester24 [email protected], ' | ||
'Testy Tester [email protected]",' | ||
|
@@ -785,7 +785,7 @@ def test_domain_request_data_full(self): | |
"Chief Tester,Purpose of the site,CISA-first-name CISA-last-name | There is more," | ||
"Testy Tester [email protected]," | ||
"[email protected],city.com,\n" | ||
"city6.gov,Submitted,Federal,Executive,Portfolio 1 Federal Agency,,N/A,,,2,,,,0,1,city1.gov,,,,," | ||
"city6.gov,Submitted,Federal,Executive,Portfolio 1 Federal Agency,,N/A,,NY,2,,,,0,1,city1.gov,,,,," | ||
"Purpose of the site,CISA-first-name CISA-last-name | There is more,Testy Tester [email protected]," | ||
"[email protected],city.com,\n" | ||
) | ||
|
@@ -794,6 +794,7 @@ def test_domain_request_data_full(self): | |
# spaces and leading/trailing whitespace | ||
csv_content = csv_content.replace(",,", "").replace(",", "").replace(" ", "").replace("\r\n", "\n").strip() | ||
expected_content = expected_content.replace(",,", "").replace(",", "").replace(" ", "").strip() | ||
self.maxDiff = None | ||
self.assertEqual(csv_content, expected_content) | ||
|
||
|
||
|
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