mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-17 18:09:25 +02:00
Fix tests
This commit is contained in:
parent
9291bb5850
commit
a9f35ea65b
2 changed files with 7 additions and 9 deletions
|
@ -1762,11 +1762,17 @@ class DomainRequestAdmin(ListHeaderAdmin, ImportExportModelAdmin):
|
||||||
if next_char.isdigit():
|
if next_char.isdigit():
|
||||||
should_apply_default_filter = True
|
should_apply_default_filter = True
|
||||||
|
|
||||||
|
# Select domain request to change -> Domain requests
|
||||||
|
if extra_context is None:
|
||||||
|
extra_context = {}
|
||||||
|
extra_context["tabtitle"] = "Domain requests"
|
||||||
|
|
||||||
if should_apply_default_filter:
|
if should_apply_default_filter:
|
||||||
# modify the GET of the request to set the selected filter
|
# modify the GET of the request to set the selected filter
|
||||||
modified_get = copy.deepcopy(request.GET)
|
modified_get = copy.deepcopy(request.GET)
|
||||||
modified_get["status__in"] = "submitted,in review,action needed"
|
modified_get["status__in"] = "submitted,in review,action needed"
|
||||||
request.GET = modified_get
|
request.GET = modified_get
|
||||||
|
|
||||||
response = super().changelist_view(request, extra_context=extra_context)
|
response = super().changelist_view(request, extra_context=extra_context)
|
||||||
return response
|
return response
|
||||||
|
|
||||||
|
@ -1775,14 +1781,6 @@ class DomainRequestAdmin(ListHeaderAdmin, ImportExportModelAdmin):
|
||||||
self.display_restricted_warning(request, obj)
|
self.display_restricted_warning(request, obj)
|
||||||
return super().change_view(request, object_id, form_url, extra_context)
|
return super().change_view(request, object_id, form_url, extra_context)
|
||||||
|
|
||||||
# Select domain request to change -> Domain requests
|
|
||||||
def changelist_view(self, request, extra_context=None):
|
|
||||||
if extra_context is None:
|
|
||||||
extra_context = {}
|
|
||||||
extra_context["tabtitle"] = "Domain requests"
|
|
||||||
# Get the filtered values
|
|
||||||
return super().changelist_view(request, extra_context=extra_context)
|
|
||||||
|
|
||||||
|
|
||||||
class TransitionDomainAdmin(ListHeaderAdmin):
|
class TransitionDomainAdmin(ListHeaderAdmin):
|
||||||
"""Custom transition domain admin class."""
|
"""Custom transition domain admin class."""
|
||||||
|
|
|
@ -1087,7 +1087,7 @@ class TestDomainAuthorizingOfficial(TestDomainOverview):
|
||||||
"""Can load domain's authorizing official page."""
|
"""Can load domain's authorizing official page."""
|
||||||
page = self.client.get(reverse("domain-authorizing-official", kwargs={"pk": self.domain.id}))
|
page = self.client.get(reverse("domain-authorizing-official", kwargs={"pk": self.domain.id}))
|
||||||
# once on the sidebar, once in the title
|
# once on the sidebar, once in the title
|
||||||
self.assertContains(page, "Authorizing official", count=2)
|
self.assertContains(page, "Authorizing official", count=3)
|
||||||
|
|
||||||
def test_domain_authorizing_official_content(self):
|
def test_domain_authorizing_official_content(self):
|
||||||
"""Authorizing official information appears on the page."""
|
"""Authorizing official information appears on the page."""
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue