Python formatting

This commit is contained in:
Mouse Reeve 2022-02-09 12:23:01 -05:00
parent 6323b0e700
commit c06817e9ff
4 changed files with 3 additions and 6 deletions

View file

@ -306,6 +306,7 @@ class Link(ActivityObject):
omit = ("id", "type", "@context") omit = ("id", "type", "@context")
return super().serialize(omit=omit) return super().serialize(omit=omit)
@dataclass(init=False) @dataclass(init=False)
class Mention(Link): class Mention(Link):
"""a subtype of Link for mentioning an actor""" """a subtype of Link for mentioning an actor"""

View file

@ -1,7 +1,6 @@
""" testing models """ """ testing models """
from dateutil.parser import parse from dateutil.parser import parse
from imagekit.models import ImageSpecField
from django.test import TestCase from django.test import TestCase
from django.utils import timezone from django.utils import timezone

View file

@ -84,12 +84,10 @@ class LinkViews(TestCase):
self.assertEqual( self.assertEqual(
activity["object"]["fileLinks"][0]["href"], "https://www.example.com" activity["object"]["fileLinks"][0]["href"], "https://www.example.com"
) )
self.assertEqual( self.assertEqual(activity["object"]["fileLinks"][0]["mediaType"], "HTML")
activity["object"]["fileLinks"][0]["mediaType"], "HTML"
)
self.assertEqual( self.assertEqual(
activity["object"]["fileLinks"][0]["attributedTo"], activity["object"]["fileLinks"][0]["attributedTo"],
self.local_user.remote_id self.local_user.remote_id,
) )
link = models.FileLink.objects.get() link = models.FileLink.objects.get()

View file

@ -6,7 +6,6 @@ from unittest.mock import patch
from django.test import TestCase from django.test import TestCase
from bookwyrm import models, views from bookwyrm import models, views
from bookwyrm.activitypub.base_activity import set_related_field
# pylint: disable=too-many-public-methods # pylint: disable=too-many-public-methods