mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-23 08:36:32 +00:00
Python formatting
This commit is contained in:
parent
9921a1e754
commit
8ea1171764
3 changed files with 5 additions and 4 deletions
|
@ -1,2 +1,2 @@
|
||||||
""" import ALL the tests """
|
""" import ALL the tests """
|
||||||
from . import * # pylint: disable=import-self
|
from . import * # pylint: disable=import-self
|
||||||
|
|
|
@ -4,10 +4,10 @@ from bookwyrm import models
|
||||||
|
|
||||||
|
|
||||||
class Author(TestCase):
|
class Author(TestCase):
|
||||||
""" serialize author tests """
|
"""serialize author tests"""
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
""" initial data """
|
"""initial data"""
|
||||||
self.book = models.Edition.objects.create(
|
self.book = models.Edition.objects.create(
|
||||||
title="Example Edition",
|
title="Example Edition",
|
||||||
remote_id="https://example.com/book/1",
|
remote_id="https://example.com/book/1",
|
||||||
|
@ -19,7 +19,7 @@ class Author(TestCase):
|
||||||
)
|
)
|
||||||
|
|
||||||
def test_serialize_model(self):
|
def test_serialize_model(self):
|
||||||
""" check presense of author fields """
|
"""check presense of author fields"""
|
||||||
activity = self.author.to_activity()
|
activity = self.author.to_activity()
|
||||||
self.assertEqual(activity["id"], self.author.remote_id)
|
self.assertEqual(activity["id"], self.author.remote_id)
|
||||||
self.assertIsInstance(activity["aliases"], list)
|
self.assertIsInstance(activity["aliases"], list)
|
||||||
|
|
|
@ -161,6 +161,7 @@ class ModelFields(TestCase):
|
||||||
@dataclass(init=False)
|
@dataclass(init=False)
|
||||||
class TestActivity(ActivityObject):
|
class TestActivity(ActivityObject):
|
||||||
"""real simple mock"""
|
"""real simple mock"""
|
||||||
|
|
||||||
# pylint: disbale=invalid-name
|
# pylint: disbale=invalid-name
|
||||||
to: List[str]
|
to: List[str]
|
||||||
cc: List[str]
|
cc: List[str]
|
||||||
|
|
Loading…
Reference in a new issue