checking to make sure tests are sync'd

This commit is contained in:
Jon Roberts 2023-04-17 13:26:28 -06:00
parent 93cc9237d0
commit a46993d003
No known key found for this signature in database
GPG key ID: EED093582198B041

View file

@ -1311,3 +1311,24 @@ class TestApplicationStatus(TestWithUser, WebTest):
self.assertContains(detail_page, "testy@town.com")
self.assertContains(detail_page, "Admin Tester")
self.assertContains(detail_page, "Status:")
def test_application_withdraw(self):
"""Checking application status page"""
application = self._completed_application()
application.save()
home_page = self.app.get("/")
self.assertContains(home_page, "citystatus.gov")
# click the "Manage" link
detail_page = home_page.click("Manage")
self.assertContains(detail_page, "citystatus.gov")
self.assertContains(detail_page, "Chief Tester")
self.assertContains(detail_page, "testy@town.com")
self.assertContains(detail_page, "Admin Tester")
self.assertContains(detail_page, "Status:")
# click the "Withdraw request" button
withdraw_page = detail_page.click("Withdraw Request")
self.assertContains(withdraw_page, "Withdraw request for")
home_page = withdraw_page.click("Withdraw request")
# confirm that the status has been updated to withdrawn
self.assertContains(home_page, "Withdrawn")