mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-05 23:28:26 +02:00
Now store remote library tracks in a dedicated model, this is much simpler
This commit is contained in:
parent
f273faf9de
commit
b29ca44797
17 changed files with 555 additions and 394 deletions
|
@ -3,9 +3,7 @@ import os
|
|||
|
||||
from funkwhale_api.factories import registry, ManyToManyFromList
|
||||
from funkwhale_api.federation.factories import (
|
||||
AudioMetadataFactory,
|
||||
ActorFactory,
|
||||
LibraryFactory,
|
||||
LibraryTrackFactory,
|
||||
)
|
||||
from funkwhale_api.users.factories import UserFactory
|
||||
|
||||
|
@ -69,8 +67,6 @@ class ImportBatchFactory(factory.django.DjangoModelFactory):
|
|||
class Params:
|
||||
federation = factory.Trait(
|
||||
submitted_by=None,
|
||||
source_library=factory.SubFactory(LibraryFactory),
|
||||
source_library_url=factory.Faker('url'),
|
||||
source='federation',
|
||||
)
|
||||
|
||||
|
@ -86,9 +82,9 @@ class ImportJobFactory(factory.django.DjangoModelFactory):
|
|||
|
||||
class Params:
|
||||
federation = factory.Trait(
|
||||
mbid=None,
|
||||
library_track=factory.SubFactory(LibraryTrackFactory),
|
||||
batch=factory.SubFactory(ImportBatchFactory, federation=True),
|
||||
source_library_url=factory.Faker('url'),
|
||||
metadata=factory.SubFactory(AudioMetadataFactory),
|
||||
)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue