Linting + test

This commit is contained in:
zandercymatics 2024-06-11 09:44:53 -06:00
parent 822829da47
commit c2a2f6fa41
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7
2 changed files with 3 additions and 6 deletions

View file

@ -669,11 +669,7 @@ class ExportDataTest(MockDb, MockEppLib):
# Define columns, sort fields, and filter condition # Define columns, sort fields, and filter condition
# We'll skip submission date because it's dynamic and therefore # We'll skip submission date because it's dynamic and therefore
# impossible to set in expected_content # impossible to set in expected_content
columns = [ columns = ["Domain request", "Domain type", "Federal type"]
"Domain request",
"Domain type",
"Federal type"
]
sort_fields = [ sort_fields = [
"requested_domain__name", "requested_domain__name",
] ]
@ -812,5 +808,5 @@ class HelperFunctions(MockDb):
"submission_date__lte": self.end_date, "submission_date__lte": self.end_date,
} }
submitted_requests_sliced_at_end_date = get_sliced_requests(filter_condition) submitted_requests_sliced_at_end_date = get_sliced_requests(filter_condition)
expected_content = [2, 2, 0, 0, 0, 0, 0, 0, 0, 1] expected_content = [2, 2, 0, 0, 0, 0, 1, 0, 0, 1]
self.assertEqual(submitted_requests_sliced_at_end_date, expected_content) self.assertEqual(submitted_requests_sliced_at_end_date, expected_content)

View file

@ -166,6 +166,7 @@ class ExportDataFederal(View):
class ExportDomainRequestDataFull(View): class ExportDomainRequestDataFull(View):
"""Generates a downloaded report containing all Domain Requests (except started)""" """Generates a downloaded report containing all Domain Requests (except started)"""
def get(self, request, *args, **kwargs): def get(self, request, *args, **kwargs):
"""Returns a content disposition response for current-full-domain-request.csv""" """Returns a content disposition response for current-full-domain-request.csv"""
response = HttpResponse(content_type="text/csv") response = HttpResponse(content_type="text/csv")