mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-18 14:16:45 +00:00
Python formatting
This commit is contained in:
parent
bb49d0dc9b
commit
d7a168e0a9
1 changed files with 2 additions and 6 deletions
|
@ -80,9 +80,7 @@ class InboxCreate(TestCase):
|
||||||
@patch("bookwyrm.activitystreams.ActivityStream.add_status")
|
@patch("bookwyrm.activitystreams.ActivityStream.add_status")
|
||||||
def test_create_comment_with_reading_status(self, *_):
|
def test_create_comment_with_reading_status(self, *_):
|
||||||
"""the "it justs works" mode"""
|
"""the "it justs works" mode"""
|
||||||
datafile = pathlib.Path(__file__).parent.joinpath(
|
datafile = pathlib.Path(__file__).parent.joinpath("../../data/ap_comment.json")
|
||||||
"../../data/ap_comment.json"
|
|
||||||
)
|
|
||||||
status_data = json.loads(datafile.read_bytes())
|
status_data = json.loads(datafile.read_bytes())
|
||||||
status_data["readingStatus"] = "to-read"
|
status_data["readingStatus"] = "to-read"
|
||||||
|
|
||||||
|
@ -97,9 +95,7 @@ class InboxCreate(TestCase):
|
||||||
self.assertTrue(redis_mock.called)
|
self.assertTrue(redis_mock.called)
|
||||||
|
|
||||||
status = models.Comment.objects.get()
|
status = models.Comment.objects.get()
|
||||||
self.assertEqual(
|
self.assertEqual(status.remote_id, "https://example.com/user/mouse/comment/6")
|
||||||
status.remote_id, "https://example.com/user/mouse/comment/6"
|
|
||||||
)
|
|
||||||
self.assertEqual(status.content, "commentary")
|
self.assertEqual(status.content, "commentary")
|
||||||
self.assertEqual(status.reading_status, "to-read")
|
self.assertEqual(status.reading_status, "to-read")
|
||||||
self.assertEqual(status.user, self.local_user)
|
self.assertEqual(status.user, self.local_user)
|
||||||
|
|
Loading…
Reference in a new issue