From 6fa29a629311498a3d42fd33eb683e8049142bbd Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Tue, 15 Feb 2022 10:32:04 -0800 Subject: [PATCH] Fixes tests --- bookwyrm/tests/views/admin/test_announcements.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bookwyrm/tests/views/admin/test_announcements.py b/bookwyrm/tests/views/admin/test_announcements.py index 3d21e6216..94f748482 100644 --- a/bookwyrm/tests/views/admin/test_announcements.py +++ b/bookwyrm/tests/views/admin/test_announcements.py @@ -74,11 +74,12 @@ class AnnouncementViews(TestCase): def test_create_announcement(self): """create a new announcement""" - view = views.Announcements.as_view() + view = views.EditAnnouncement.as_view() form = forms.AnnouncementForm() form.data["preview"] = "hi hi" form.data["start_date"] = "2021-05-20" form.data["user"] = self.local_user.id + form.data["display_type"] = "warning-light" request = self.factory.post("", form.data) request.user = self.local_user @@ -97,11 +98,12 @@ class AnnouncementViews(TestCase): announcement = models.Announcement.objects.create( preview="hi", user=self.local_user ) - view = views.Announcement.as_view() + view = views.EditAnnouncement.as_view() form = forms.AnnouncementForm(instance=announcement) form.data["preview"] = "hi hi" form.data["start_date"] = "2021-05-20" form.data["user"] = self.local_user.id + form.data["display_type"] = "warning-light" request = self.factory.post("", form.data) request.user = self.local_user