From 73c4a01a6e2f57024cced957e3f12d6b8fefd05d Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Thu, 14 Jul 2022 11:45:59 -0700 Subject: [PATCH] Test for PermissionDenied error, not isNone --- bookwyrm/tests/views/shelf/test_shelf_actions.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bookwyrm/tests/views/shelf/test_shelf_actions.py b/bookwyrm/tests/views/shelf/test_shelf_actions.py index 2f2c208c7..6d593c5e9 100644 --- a/bookwyrm/tests/views/shelf/test_shelf_actions.py +++ b/bookwyrm/tests/views/shelf/test_shelf_actions.py @@ -183,9 +183,9 @@ class ShelfActionViews(TestCase): request = self.factory.post("", form.data) request.user = self.local_user - views.create_shelf(request) + with self.assertRaises(PermissionDenied): + views.create_shelf(request) - self.assertIsNone(models.Shelf.objects.filter(name="new shelf name")) def test_delete_shelf(self, *_): """delete a brand new custom shelf"""