mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-26 12:38:36 +02:00
a few improvements to code, comments, and tests
This commit is contained in:
parent
851e176f83
commit
c2f71c984f
3 changed files with 17 additions and 9 deletions
|
@ -268,7 +268,7 @@ class TestDomainRequestAdmin(MockEppLib):
|
|||
@less_console_noise_decorator
|
||||
def test_domain_requests_by_portfolio(self):
|
||||
"""
|
||||
Tests that domain_requests display for a portfolio.
|
||||
Tests that domain_requests display for a portfolio. And requests not in portfolio do not display.
|
||||
"""
|
||||
|
||||
portfolio, _ = Portfolio.objects.get_or_create(organization_name="Test Portfolio", creator=self.superuser)
|
||||
|
@ -276,6 +276,9 @@ class TestDomainRequestAdmin(MockEppLib):
|
|||
domain_request = completed_domain_request(
|
||||
status=DomainRequest.DomainRequestStatus.IN_REVIEW, portfolio=portfolio
|
||||
)
|
||||
domain_request2 = completed_domain_request(
|
||||
name="testdomain2.gov", status=DomainRequest.DomainRequestStatus.IN_REVIEW
|
||||
)
|
||||
|
||||
self.client.force_login(self.superuser)
|
||||
response = self.client.get(
|
||||
|
@ -286,6 +289,7 @@ class TestDomainRequestAdmin(MockEppLib):
|
|||
# Make sure the page loaded, and that we're on the right page
|
||||
self.assertEqual(response.status_code, 200)
|
||||
self.assertContains(response, domain_request.requested_domain.name)
|
||||
self.assertNotContains(response, domain_request2.requested_domain.name)
|
||||
self.assertContains(response, portfolio.organization_name)
|
||||
|
||||
@less_console_noise_decorator
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue