From b9e6824360a5e78054fe177dc764cf563f3bc359 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Fri, 15 Oct 2021 10:07:29 -0700 Subject: [PATCH] Imrpove test names --- bookwyrm/tests/views/test_status.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/bookwyrm/tests/views/test_status.py b/bookwyrm/tests/views/test_status.py index 93eedb74e..506569cc8 100644 --- a/bookwyrm/tests/views/test_status.py +++ b/bookwyrm/tests/views/test_status.py @@ -51,7 +51,7 @@ class StatusViews(TestCase): ) models.SiteSettings.objects.create() - def test_handle_status(self, *_): + def test_create_status(self, *_): """create a status""" view = views.CreateStatus.as_view() form = forms.CommentForm( @@ -73,7 +73,7 @@ class StatusViews(TestCase): self.assertEqual(status.book, self.book) self.assertIsNone(status.edited_date) - def test_handle_status_reply(self, *_): + def test_create_status_reply(self, *_): """create a status in reply to an existing status""" view = views.CreateStatus.as_view() user = models.User.objects.create_user( @@ -100,7 +100,7 @@ class StatusViews(TestCase): self.assertEqual(status.user, user) self.assertEqual(models.Notification.objects.get().user, self.local_user) - def test_handle_status_mentions(self, *_): + def test_create_status_mentions(self, *_): """@mention a user in a post""" view = views.CreateStatus.as_view() user = models.User.objects.create_user( @@ -130,7 +130,7 @@ class StatusViews(TestCase): status.content, f'

hi @rat

' ) - def test_handle_status_reply_with_mentions(self, *_): + def test_create_status_reply_with_mentions(self, *_): """reply to a post with an @mention'ed user""" view = views.CreateStatus.as_view() user = models.User.objects.create_user( @@ -297,7 +297,7 @@ http://www.fish.com/""" result = views.status.to_markdown(text) self.assertEqual(result, '

hi ' "is rad

") - def test_handle_delete_status(self, mock, *_): + def test_delete_status(self, mock, *_): """marks a status as deleted""" view = views.DeleteStatus.as_view() with patch("bookwyrm.activitystreams.add_status_task.delay"): @@ -315,7 +315,7 @@ http://www.fish.com/""" status.refresh_from_db() self.assertTrue(status.deleted) - def test_handle_delete_status_permission_denied(self, *_): + def test_delete_status_permission_denied(self, *_): """marks a status as deleted""" view = views.DeleteStatus.as_view() with patch("bookwyrm.activitystreams.add_status_task.delay"): @@ -330,7 +330,7 @@ http://www.fish.com/""" status.refresh_from_db() self.assertFalse(status.deleted) - def test_handle_delete_status_moderator(self, mock, *_): + def test_delete_status_moderator(self, mock, *_): """marks a status as deleted""" view = views.DeleteStatus.as_view() with patch("bookwyrm.activitystreams.add_status_task.delay"):