mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-29 20:43:10 +02:00
unit tests + lint
This commit is contained in:
parent
5d2e250467
commit
150cd6e747
3 changed files with 6 additions and 4 deletions
|
@ -43,6 +43,8 @@ class TestGroups(TestCase):
|
|||
"add_portfolio",
|
||||
"change_portfolio",
|
||||
"delete_portfolio",
|
||||
"add_portfolioinvitation",
|
||||
"view_portfolioinvitation",
|
||||
"add_seniorofficial",
|
||||
"change_seniorofficial",
|
||||
"delete_seniorofficial",
|
||||
|
|
|
@ -441,10 +441,11 @@ class TestDomainDetail(TestDomainOverview):
|
|||
user.refresh_from_db()
|
||||
self.client.force_login(user)
|
||||
detail_page = self.client.get(f"/domain/{domain.id}")
|
||||
# Check that alert message displays properly
|
||||
# Check that alert message displays properly.
|
||||
# This message is different for one user on the portfolio vs multiple.
|
||||
self.assertContains(
|
||||
detail_page,
|
||||
"If you need to make updates, contact one of the listed domain managers.",
|
||||
"If you need to become a domain manager, edit the domain assignments",
|
||||
)
|
||||
# Check that user does not have option to Edit domain
|
||||
self.assertNotContains(detail_page, "Edit")
|
||||
|
|
|
@ -406,8 +406,7 @@ class DomainView(DomainBaseView):
|
|||
|
||||
context["hidden_security_emails"] = default_emails
|
||||
context["user_portfolio_permission"] = UserPortfolioPermission.objects.filter(
|
||||
user=self.request.user,
|
||||
portfolio=self.request.session.get("portfolio")
|
||||
user=self.request.user, portfolio=self.request.session.get("portfolio")
|
||||
).first()
|
||||
|
||||
security_email = self.object.get_security_email()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue