tweaking unit tests still

This commit is contained in:
Jon Roberts 2023-04-10 14:20:17 -06:00
parent 803fe81f2d
commit ae9d67ceb7
No known key found for this signature in database
GPG key ID: EED093582198B041

View file

@ -1131,9 +1131,10 @@ class TestDomainDetail(TestWithDomainPermissions, WebTest):
success_page = success_result.follow()
self.assertContains(success_page, "mayor@igorville.gov")
class TestApplicationStatus(TestCase):
class TestApplicationStatus(TestWithUser, WebTest):
def setUp(self):
super().setUp()
self.app.set_user(self.user.username)
def _completed_application(
self,
@ -1195,7 +1196,7 @@ class TestApplicationStatus(TestCase):
application.status = DomainApplication.SUBMITTED
application.save()
if has_other_contacts:
application.other_contacts.add(other)
if has_current_website:
@ -1207,7 +1208,10 @@ class TestApplicationStatus(TestCase):
def test_application_status(self):
"""Checking application status page"""
application = self._completed_application()
application.save()
home_page = self.app.get("/")
print(home_page)
self.assertContains(home_page, "citystatus.gov")
# click the "Manage" link
detail_page = home_page.click("Manage")