Imrpove test names

This commit is contained in:
Mouse Reeve 2021-10-15 10:07:29 -07:00
parent 117e6a08b2
commit b9e6824360

View file

@ -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'<p>hi <a href="{user.remote_id}">@rat</a></p>'
)
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, '<p><a href="http://fish.com">hi</a> ' "is rad</p>")
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"):