mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-06 07:09:56 +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
|
@ -286,7 +286,7 @@ def test_instance_policy_serializer_purges_target_actor(
|
|||
|
||||
|
||||
def test_manage_artist_serializer(factories, now, to_api_date):
|
||||
artist = factories["music.Artist"](attributed=True)
|
||||
artist = factories["music.Artist"](attributed=True, with_cover=True)
|
||||
track = factories["music.Track"](artist=artist)
|
||||
album = factories["music.Album"](artist=artist)
|
||||
expected = {
|
||||
|
@ -331,7 +331,7 @@ def test_manage_nested_track_serializer(factories, now, to_api_date):
|
|||
|
||||
|
||||
def test_manage_nested_album_serializer(factories, now, to_api_date):
|
||||
album = factories["music.Album"]()
|
||||
album = factories["music.Album"](with_cover=True)
|
||||
setattr(album, "tracks_count", 44)
|
||||
expected = {
|
||||
"id": album.id,
|
||||
|
@ -367,7 +367,7 @@ def test_manage_nested_artist_serializer(factories, now, to_api_date):
|
|||
|
||||
|
||||
def test_manage_album_serializer(factories, now, to_api_date):
|
||||
album = factories["music.Album"](attributed=True)
|
||||
album = factories["music.Album"](attributed=True, with_cover=True)
|
||||
track = factories["music.Track"](album=album)
|
||||
expected = {
|
||||
"id": album.id,
|
||||
|
@ -392,7 +392,7 @@ def test_manage_album_serializer(factories, now, to_api_date):
|
|||
|
||||
|
||||
def test_manage_track_serializer(factories, now, to_api_date):
|
||||
track = factories["music.Track"](attributed=True)
|
||||
track = factories["music.Track"](attributed=True, with_cover=True)
|
||||
setattr(track, "uploads_count", 44)
|
||||
expected = {
|
||||
"id": track.id,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue