mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-13 04:59:59 +02:00
add test_approved_application_not_in_active_requests unit test and lint
This commit is contained in:
parent
1260c15d81
commit
8066bceced
1 changed files with 15 additions and 0 deletions
|
@ -1500,3 +1500,18 @@ class TestApplicationStatus(TestWithUser, WebTest):
|
||||||
reverse(url_name, kwargs={"pk": application.pk})
|
reverse(url_name, kwargs={"pk": application.pk})
|
||||||
)
|
)
|
||||||
self.assertEqual(page.status_code, 403)
|
self.assertEqual(page.status_code, 403)
|
||||||
|
|
||||||
|
def test_approved_application_not_in_active_requests(self):
|
||||||
|
"""An approved application is not shown in the Active
|
||||||
|
Requests table on home.html."""
|
||||||
|
application = completed_application(
|
||||||
|
status=DomainApplication.APPROVED, user=self.user
|
||||||
|
)
|
||||||
|
application.save()
|
||||||
|
|
||||||
|
home_page = self.app.get("/")
|
||||||
|
# This works in our test environment because creating
|
||||||
|
# an approved application here does not generate a
|
||||||
|
# domain object, so we do not expect to see 'city.gov'
|
||||||
|
# in either the Domains or Requests tables.
|
||||||
|
self.assertNotContains(home_page, "city.gov")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue