Verified Commit 4f7fa09a authored by Eliot Berriot's avatar Eliot Berriot
Browse files

Playlisttrack factory

parent d7adaf39
import factory import factory
from funkwhale_api.factories import registry from funkwhale_api.factories import registry
from funkwhale_api.music.factories import TrackFactory
from funkwhale_api.users.factories import UserFactory from funkwhale_api.users.factories import UserFactory
...@@ -11,3 +12,12 @@ class PlaylistFactory(factory.django.DjangoModelFactory): ...@@ -11,3 +12,12 @@ class PlaylistFactory(factory.django.DjangoModelFactory):
class Meta: class Meta:
model = 'playlists.Playlist' model = 'playlists.Playlist'
@registry.register
class PlaylistTrackFactory(factory.django.DjangoModelFactory):
playlist = factory.SubFactory(PlaylistFactory)
track = factory.SubFactory(TrackFactory)
class Meta:
model = 'playlists.PlaylistTrack'
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment