Skip to content
Snippets Groups Projects
Verified Commit ee1449bd authored by Eliot Berriot's avatar Eliot Berriot
Browse files

added real file in track factory

parent 6adc8f0c
No related branches found
No related tags found
No related merge requests found
import factory
import os
SAMPLES_PATH = os.path.dirname(os.path.abspath(__file__))
class ArtistFactory(factory.django.DjangoModelFactory):
......@@ -33,7 +36,8 @@ class TrackFactory(factory.django.DjangoModelFactory):
class TrackFileFactory(factory.django.DjangoModelFactory):
track = factory.SubFactory(TrackFactory)
audio_file = factory.django.FileField()
audio_file = factory.django.FileField(
from_path=os.path.join(SAMPLES_PATH, 'test.ogg'))
class Meta:
model = 'music.TrackFile'
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment