mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-29 13:01:08 +00:00
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")
|
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"""
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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()
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue