mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-23 01:51:08 +00:00
Black
This commit is contained in:
parent
cd940e2c40
commit
00c2930290
2 changed files with 4 additions and 6 deletions
|
@ -22,7 +22,9 @@ class Command(BaseCommand):
|
||||||
)
|
)
|
||||||
self.stdout.write(" | ✧ Thank you for your patience ✧")
|
self.stdout.write(" | ✧ Thank you for your patience ✧")
|
||||||
|
|
||||||
users = models.User.objects.filter(local=False).exclude(Q(preview_image='')|Q(preview_image=None))
|
users = models.User.objects.filter(local=False).exclude(
|
||||||
|
Q(preview_image="") | Q(preview_image=None)
|
||||||
|
)
|
||||||
|
|
||||||
if len(users) > 0:
|
if len(users) > 0:
|
||||||
self.stdout.write(
|
self.stdout.write(
|
||||||
|
@ -33,8 +35,6 @@ class Command(BaseCommand):
|
||||||
self.stdout.write(".", ending="")
|
self.stdout.write(".", ending="")
|
||||||
self.stdout.write(" OK 🖼")
|
self.stdout.write(" OK 🖼")
|
||||||
else:
|
else:
|
||||||
self.stdout.write(
|
self.stdout.write(f" | There was no remote users with preview images.")
|
||||||
f" | There was no remote users with preview images."
|
|
||||||
)
|
|
||||||
|
|
||||||
self.stdout.write("🧑🚒 ⎨ I’m all done! ✧ Enjoy ✧")
|
self.stdout.write("🧑🚒 ⎨ I’m all done! ✧ Enjoy ✧")
|
||||||
|
|
|
@ -162,7 +162,6 @@ class PreviewImages(TestCase):
|
||||||
|
|
||||||
self.assertFalse(self.remote_user.preview_image)
|
self.assertFalse(self.remote_user.preview_image)
|
||||||
|
|
||||||
|
|
||||||
def test_generate_user_preview_images_task(self, *args, **kwargs):
|
def test_generate_user_preview_images_task(self, *args, **kwargs):
|
||||||
"""test task's external calls"""
|
"""test task's external calls"""
|
||||||
with patch("bookwyrm.preview_images.generate_preview_image") as generate_mock:
|
with patch("bookwyrm.preview_images.generate_preview_image") as generate_mock:
|
||||||
|
@ -171,7 +170,6 @@ class PreviewImages(TestCase):
|
||||||
self.assertEqual(args["texts"]["text_one"], "possum")
|
self.assertEqual(args["texts"]["text_one"], "possum")
|
||||||
self.assertEqual(args["texts"]["text_three"], f"@possum@{settings.DOMAIN}")
|
self.assertEqual(args["texts"]["text_three"], f"@possum@{settings.DOMAIN}")
|
||||||
|
|
||||||
|
|
||||||
def test_remove_user_preview_image_task(self, *args, **kwargs):
|
def test_remove_user_preview_image_task(self, *args, **kwargs):
|
||||||
"""you can delete the preview image for a (remote) user"""
|
"""you can delete the preview image for a (remote) user"""
|
||||||
remove_user_preview_image_task(self.remote_user_with_preview.id)
|
remove_user_preview_image_task(self.remote_user_with_preview.id)
|
||||||
|
|
Loading…
Reference in a new issue