mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-06 02:40:00 +02:00
Now use import job everywhere, even for direct file imports
This commit is contained in:
parent
5d2dbbc828
commit
2e616282fd
9 changed files with 318 additions and 66 deletions
|
@ -72,6 +72,14 @@ class ImportJobFactory(factory.django.DjangoModelFactory):
|
|||
model = 'music.ImportJob'
|
||||
|
||||
|
||||
@registry.register(name='music.FileImportJob')
|
||||
class FileImportJobFactory(ImportJobFactory):
|
||||
source = 'file://'
|
||||
mbid = None
|
||||
audio_file = factory.django.FileField(
|
||||
from_path=os.path.join(SAMPLES_PATH, 'test.ogg'))
|
||||
|
||||
|
||||
@registry.register
|
||||
class WorkFactory(factory.django.DjangoModelFactory):
|
||||
mbid = factory.Faker('uuid4')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue