From 8a39a463101d3ac3ca59361c1a134a14b277e4f7 Mon Sep 17 00:00:00 2001 From: james1293 Date: Tue, 23 Jul 2019 15:29:19 -0400 Subject: [PATCH] test_del_list => test_del_list_not_in_list_group --- todo/tests/test_views.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/todo/tests/test_views.py b/todo/tests/test_views.py index 9ad05d6..ce35ed7 100644 --- a/todo/tests/test_views.py +++ b/todo/tests/test_views.py @@ -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. """