test_del_list => test_del_list_not_in_list_group

This commit is contained in:
james1293 2019-07-23 15:29:19 -04:00
parent f1c2c4c89f
commit 8a39a46310

View file

@ -62,13 +62,6 @@ def test_view_list(todo_setup, admin_client):
assert response.status_code == 200
def test_del_list(todo_setup, admin_client):
tlist = TaskList.objects.get(slug="zip")
url = reverse("todo:del_list", kwargs={"list_id": tlist.id, "list_slug": tlist.slug})
response = admin_client.get(url)
assert response.status_code == 200
def test_view_add_list(todo_setup, admin_client):
url = reverse("todo:add_list")
response = admin_client.get(url)
@ -182,6 +175,13 @@ def test_view_del_list_nonadmin(todo_setup, client):
assert response.status_code == 302 # Fedirected to login
def test_del_list_not_in_list_group(todo_setup, admin_client):
tlist = TaskList.objects.get(slug="zip")
url = reverse("todo:del_list", kwargs={"list_id": tlist.id, "list_slug": tlist.slug})
response = admin_client.get(url)
assert response.status_code == 403
def test_view_list_mine(todo_setup, client):
"""View a list in a group I belong to.
"""