forked from mirrors/bookwyrm
Python formatting
This commit is contained in:
parent
6323b0e700
commit
c06817e9ff
4 changed files with 3 additions and 6 deletions
|
@ -306,6 +306,7 @@ class Link(ActivityObject):
|
|||
omit = ("id", "type", "@context")
|
||||
return super().serialize(omit=omit)
|
||||
|
||||
|
||||
@dataclass(init=False)
|
||||
class Mention(Link):
|
||||
"""a subtype of Link for mentioning an actor"""
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
""" testing models """
|
||||
from dateutil.parser import parse
|
||||
|
||||
from imagekit.models import ImageSpecField
|
||||
from django.test import TestCase
|
||||
from django.utils import timezone
|
||||
|
||||
|
|
|
@ -84,12 +84,10 @@ class LinkViews(TestCase):
|
|||
self.assertEqual(
|
||||
activity["object"]["fileLinks"][0]["href"], "https://www.example.com"
|
||||
)
|
||||
self.assertEqual(
|
||||
activity["object"]["fileLinks"][0]["mediaType"], "HTML"
|
||||
)
|
||||
self.assertEqual(activity["object"]["fileLinks"][0]["mediaType"], "HTML")
|
||||
self.assertEqual(
|
||||
activity["object"]["fileLinks"][0]["attributedTo"],
|
||||
self.local_user.remote_id
|
||||
self.local_user.remote_id,
|
||||
)
|
||||
|
||||
link = models.FileLink.objects.get()
|
||||
|
|
|
@ -6,7 +6,6 @@ from unittest.mock import patch
|
|||
from django.test import TestCase
|
||||
|
||||
from bookwyrm import models, views
|
||||
from bookwyrm.activitypub.base_activity import set_related_field
|
||||
|
||||
|
||||
# pylint: disable=too-many-public-methods
|
||||
|
|
Loading…
Reference in a new issue