From 584e0a54af12559841b382c2f157a54e87f27397 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Sat, 16 Oct 2021 07:06:49 -0700 Subject: [PATCH] Adds test to catch invalid link --- bookwyrm/tests/views/books/test_edit_book.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/bookwyrm/tests/views/books/test_edit_book.py b/bookwyrm/tests/views/books/test_edit_book.py index 85bbc032..7bf5708f 100644 --- a/bookwyrm/tests/views/books/test_edit_book.py +++ b/bookwyrm/tests/views/books/test_edit_book.py @@ -58,6 +58,17 @@ class EditBookViews(TestCase): validate_html(result.render()) self.assertEqual(result.status_code, 200) + def test_edit_book_create_page(self): + """there are so many views, this just makes sure it LOADS""" + view = views.EditBook.as_view() + request = self.factory.get("") + request.user = self.local_user + request.user.is_superuser = True + result = view(request) + self.assertIsInstance(result, TemplateResponse) + validate_html(result.render()) + self.assertEqual(result.status_code, 200) + def test_edit_book(self): """lets a user edit a book""" view = views.EditBook.as_view()