New version of black, new whitespace
This commit is contained in:
@ -11,10 +11,10 @@ from bookwyrm.activitypub import ActivitySerializerError
|
||||
|
||||
# pylint: disable=too-many-public-methods
|
||||
class InboxCreate(TestCase):
|
||||
""" readthrough tests """
|
||||
"""readthrough tests"""
|
||||
|
||||
def setUp(self):
|
||||
""" basic user and book data """
|
||||
"""basic user and book data"""
|
||||
self.local_user = models.User.objects.create_user(
|
||||
"mouse@example.com",
|
||||
"mouse@mouse.com",
|
||||
@ -53,7 +53,7 @@ class InboxCreate(TestCase):
|
||||
models.SiteSettings.objects.create()
|
||||
|
||||
def test_create_status(self):
|
||||
""" the "it justs works" mode """
|
||||
"""the "it justs works" mode"""
|
||||
self.assertEqual(models.Status.objects.count(), 1)
|
||||
|
||||
datafile = pathlib.Path(__file__).parent.joinpath(
|
||||
@ -84,7 +84,7 @@ class InboxCreate(TestCase):
|
||||
self.assertEqual(models.Status.objects.count(), 2)
|
||||
|
||||
def test_create_status_remote_note_with_mention(self):
|
||||
""" should only create it under the right circumstances """
|
||||
"""should only create it under the right circumstances"""
|
||||
self.assertEqual(models.Status.objects.count(), 1)
|
||||
self.assertFalse(
|
||||
models.Notification.objects.filter(user=self.local_user).exists()
|
||||
@ -107,7 +107,7 @@ class InboxCreate(TestCase):
|
||||
self.assertEqual(models.Notification.objects.get().notification_type, "MENTION")
|
||||
|
||||
def test_create_status_remote_note_with_reply(self):
|
||||
""" should only create it under the right circumstances """
|
||||
"""should only create it under the right circumstances"""
|
||||
self.assertEqual(models.Status.objects.count(), 1)
|
||||
self.assertFalse(models.Notification.objects.filter(user=self.local_user))
|
||||
|
||||
@ -128,7 +128,7 @@ class InboxCreate(TestCase):
|
||||
self.assertEqual(models.Notification.objects.get().notification_type, "REPLY")
|
||||
|
||||
def test_create_list(self):
|
||||
""" a new list """
|
||||
"""a new list"""
|
||||
activity = self.create_json
|
||||
activity["object"] = {
|
||||
"id": "https://example.com/list/22",
|
||||
@ -152,7 +152,7 @@ class InboxCreate(TestCase):
|
||||
self.assertEqual(book_list.remote_id, "https://example.com/list/22")
|
||||
|
||||
def test_create_unsupported_type(self):
|
||||
""" ignore activities we know we can't handle """
|
||||
"""ignore activities we know we can't handle"""
|
||||
activity = self.create_json
|
||||
activity["object"] = {
|
||||
"id": "https://example.com/status/887",
|
||||
@ -162,7 +162,7 @@ class InboxCreate(TestCase):
|
||||
views.inbox.activity_task(activity)
|
||||
|
||||
def test_create_unknown_type(self):
|
||||
""" ignore activities we know we've never heard of """
|
||||
"""ignore activities we know we've never heard of"""
|
||||
activity = self.create_json
|
||||
activity["object"] = {
|
||||
"id": "https://example.com/status/887",
|
||||
|
Reference in New Issue
Block a user