mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-25 20:18:38 +02:00
lint and fix existing unit tests
This commit is contained in:
parent
d44bcadafb
commit
934d06dfb5
3 changed files with 1 additions and 6 deletions
|
@ -1573,9 +1573,6 @@ class TestRequestingEntity(WebTest):
|
||||||
def test_requesting_entity_page_errors(self):
|
def test_requesting_entity_page_errors(self):
|
||||||
"""Tests that we get the expected form errors on requesting entity"""
|
"""Tests that we get the expected form errors on requesting entity"""
|
||||||
domain_request = completed_domain_request(user=self.user, portfolio=self.portfolio)
|
domain_request = completed_domain_request(user=self.user, portfolio=self.portfolio)
|
||||||
UserPortfolioPermission.objects.create(
|
|
||||||
portfolio=self.portfolio, user=self.user, roles=[UserPortfolioRoleChoices.ORGANIZATION_ADMIN]
|
|
||||||
)
|
|
||||||
response = self.app.get(reverse("edit-domain-request", kwargs={"id": domain_request.pk})).follow()
|
response = self.app.get(reverse("edit-domain-request", kwargs={"id": domain_request.pk})).follow()
|
||||||
form = response.forms[0]
|
form = response.forms[0]
|
||||||
session_id = self.app.cookies[settings.SESSION_COOKIE_NAME]
|
session_id = self.app.cookies[settings.SESSION_COOKIE_NAME]
|
||||||
|
|
|
@ -2887,8 +2887,6 @@ class DomainRequestTestDifferentStatuses(TestWithUser, WebTest):
|
||||||
detail_page = self.app.get(f"/domain-request/{domain_request.id}")
|
detail_page = self.app.get(f"/domain-request/{domain_request.id}")
|
||||||
self.assertContains(detail_page, "city.gov")
|
self.assertContains(detail_page, "city.gov")
|
||||||
self.assertContains(detail_page, "city1.gov")
|
self.assertContains(detail_page, "city1.gov")
|
||||||
self.assertContains(detail_page, "Chief Tester")
|
|
||||||
self.assertContains(detail_page, "testy@town.com")
|
|
||||||
self.assertContains(detail_page, "Status:")
|
self.assertContains(detail_page, "Status:")
|
||||||
# click the "Withdraw request" button
|
# click the "Withdraw request" button
|
||||||
mock_client = MockSESClient()
|
mock_client = MockSESClient()
|
||||||
|
|
|
@ -600,7 +600,7 @@ class RequestingEntity(DomainRequestWizard):
|
||||||
sub_organization = cleaned_data.get("sub_organization")
|
sub_organization = cleaned_data.get("sub_organization")
|
||||||
requested_suborganization = cleaned_data.get("requested_suborganization")
|
requested_suborganization = cleaned_data.get("requested_suborganization")
|
||||||
|
|
||||||
# If no suborganization presently exists but the user filled out
|
# If no suborganization presently exists but the user filled out
|
||||||
# org information then create a suborg automatically.
|
# org information then create a suborg automatically.
|
||||||
if is_suborganization and (sub_organization or requested_suborganization):
|
if is_suborganization and (sub_organization or requested_suborganization):
|
||||||
# Cleanup the organization name field, as this isn't for suborganizations.
|
# Cleanup the organization name field, as this isn't for suborganizations.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue