mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-16 21:26:33 +00:00
Imrpove test names
This commit is contained in:
parent
117e6a08b2
commit
b9e6824360
1 changed files with 7 additions and 7 deletions
|
@ -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"):
|
||||
|
|
Loading…
Reference in a new issue