mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2025-02-25 07:16:19 +00:00
Patch setup in status tests
This commit is contained in:
parent
1d7cea2789
commit
104e4d7cf7
1 changed files with 6 additions and 5 deletions
|
@ -26,11 +26,12 @@ class Status(TestCase):
|
||||||
'../../static/images/default_avi.jpg')
|
'../../static/images/default_avi.jpg')
|
||||||
image = Image.open(image_file)
|
image = Image.open(image_file)
|
||||||
output = BytesIO()
|
output = BytesIO()
|
||||||
image.save(output, format=image.format)
|
with patch('bookwyrm.models.Status.broadcast'):
|
||||||
self.book.cover.save(
|
image.save(output, format=image.format)
|
||||||
'test.jpg',
|
self.book.cover.save(
|
||||||
ContentFile(output.getvalue())
|
'test.jpg',
|
||||||
)
|
ContentFile(output.getvalue())
|
||||||
|
)
|
||||||
|
|
||||||
def test_status_generated_fields(self, _):
|
def test_status_generated_fields(self, _):
|
||||||
''' setting remote id '''
|
''' setting remote id '''
|
||||||
|
|
Loading…
Reference in a new issue