mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-12 05:58:18 +02:00
Update test and logic
This commit is contained in:
parent
f52c36ef12
commit
36007cc693
3 changed files with 2 additions and 7 deletions
|
@ -50,7 +50,6 @@
|
|||
</section>
|
||||
</div>
|
||||
<div class="section-outlined__utility-button mobile-lg:padding-right-105 {% if portfolio %} mobile:grid-col-12 desktop:grid-col-6 desktop:padding-left-3{% endif %}" id="export-csv">
|
||||
|
||||
<section aria-label="Domain Requests report component" class="margin-top-205">
|
||||
<a href="{% url 'export_data_type_requests' %}" class="usa-button usa-button--unstyled usa-button--with-icon usa-button--justify-right" role="button">
|
||||
<svg class="usa-icon usa-icon--big" aria-hidden="true" focusable="false" role="img" width="24" height="24">
|
||||
|
|
|
@ -424,7 +424,6 @@ class ExportDataTest(MockDbForIndividualTests, MockEppLib):
|
|||
|
||||
# Get the CSV content
|
||||
csv_content = self._run_domain_request_data_type_user_export(request)
|
||||
print("CSV CONTENT FIRST TIME IS ", csv_content)
|
||||
|
||||
# We expect only domain requests associated with the user's portfolio
|
||||
self.assertIn(dd_1.name, csv_content)
|
||||
|
@ -437,7 +436,6 @@ class ExportDataTest(MockDbForIndividualTests, MockEppLib):
|
|||
portfolio_permission.refresh_from_db()
|
||||
|
||||
csv_content = self._run_domain_request_data_type_user_export(request)
|
||||
print("CSV CONTENT SECOND TIME IS ", csv_content)
|
||||
|
||||
self.assertIn(dd_1.name, csv_content)
|
||||
self.assertIn(dd_3.name, csv_content)
|
||||
|
@ -447,12 +445,11 @@ class ExportDataTest(MockDbForIndividualTests, MockEppLib):
|
|||
portfolio_permission.save()
|
||||
portfolio_permission.refresh_from_db()
|
||||
|
||||
# Get the CSV content -- Q: no portfolio but dd2 is not displaying correctly
|
||||
# Domain Request NOT in Portfolio
|
||||
csv_content = self._run_domain_request_data_type_user_export(request)
|
||||
print("CSV CONTENT THIRD TIME IS ", csv_content)
|
||||
self.assertNotIn(dd_1.name, csv_content)
|
||||
self.assertNotIn(dd_3.name, csv_content)
|
||||
self.assertIn(dd_2.name, csv_content)
|
||||
self.assertNotIn(dd_2.name, csv_content)
|
||||
|
||||
# Clean up the created objects
|
||||
dr_1.delete()
|
||||
|
|
|
@ -176,7 +176,6 @@ class ExportDataTypeRequests(View):
|
|||
print("ExportDataTypeRequests get method called")
|
||||
response = HttpResponse(content_type="text/csv")
|
||||
response["Content-Disposition"] = 'attachment; filename="domain-requests.csv"'
|
||||
print("!!!!!!!!!!!", dir(csv_export.DomainRequestsDataType))
|
||||
csv_export.DomainRequestsDataType.exporting_dr_data_to_csv(response, request=request)
|
||||
|
||||
return response
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue