mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-29 08:50:01 +02:00
Clean up branch from unrelated work
This commit is contained in:
parent
5a8c4c072b
commit
f4ce27a4ab
2 changed files with 1 additions and 20 deletions
|
@ -1500,19 +1500,3 @@ 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 environemnt 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")
|
|
||||||
|
|
|
@ -9,10 +9,7 @@ def index(request):
|
||||||
context = {}
|
context = {}
|
||||||
if request.user.is_authenticated:
|
if request.user.is_authenticated:
|
||||||
applications = DomainApplication.objects.filter(creator=request.user)
|
applications = DomainApplication.objects.filter(creator=request.user)
|
||||||
# Let's exclude the approved applications since our
|
context["domain_applications"] = applications
|
||||||
# domain_applications context will be used to populate
|
|
||||||
# the active applications table
|
|
||||||
context["domain_applications"] = applications.exclude(status="approved")
|
|
||||||
|
|
||||||
domains = request.user.permissions.values(
|
domains = request.user.permissions.values(
|
||||||
"role",
|
"role",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue