mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-17 10:07:04 +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():
|
||||
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:
|
||||
# modify the GET of the request to set the selected filter
|
||||
modified_get = copy.deepcopy(request.GET)
|
||||
modified_get["status__in"] = "submitted,in review,action needed"
|
||||
request.GET = modified_get
|
||||
|
||||
response = super().changelist_view(request, extra_context=extra_context)
|
||||
return response
|
||||
|
||||
|
@ -1775,14 +1781,6 @@ class DomainRequestAdmin(ListHeaderAdmin, ImportExportModelAdmin):
|
|||
self.display_restricted_warning(request, obj)
|
||||
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):
|
||||
"""Custom transition domain admin class."""
|
||||
|
|
|
@ -1087,7 +1087,7 @@ class TestDomainAuthorizingOfficial(TestDomainOverview):
|
|||
"""Can load domain's authorizing official page."""
|
||||
page = self.client.get(reverse("domain-authorizing-official", kwargs={"pk": self.domain.id}))
|
||||
# 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):
|
||||
"""Authorizing official information appears on the page."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue