mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-05 02:59:24 +02:00
Faster tests by not creating covers unless mandatory
This commit is contained in:
parent
48681c39db
commit
c9259c906b
22 changed files with 110 additions and 68 deletions
|
@ -141,7 +141,7 @@ def test_render_html(text, content_type, permissive, expected):
|
|||
|
||||
|
||||
def test_attach_file_url(factories):
|
||||
album = factories["music.Album"]()
|
||||
album = factories["music.Album"](with_cover=True)
|
||||
existing_attachment = album.attachment_cover
|
||||
assert existing_attachment is not None
|
||||
|
||||
|
@ -160,7 +160,7 @@ def test_attach_file_url(factories):
|
|||
|
||||
|
||||
def test_attach_file_url_fetch(factories, r_mock):
|
||||
album = factories["music.Album"]()
|
||||
album = factories["music.Album"](with_cover=True)
|
||||
|
||||
data = {"mimetype": "image/jpeg", "url": "https://example.com/test.jpg"}
|
||||
r_mock.get(data["url"], body=io.BytesIO(b"content"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue