Skip to content
Snippets Groups Projects
Verified Commit e06f7061 authored by Ernesto Rico Schmidt's avatar Ernesto Rico Schmidt
Browse files

test: add factory and fixture for Playlist

parent 58945d32
No related branches found
No related tags found
1 merge request!59Add playlists
......@@ -14,6 +14,7 @@ from program.models import (
License,
LinkType,
MusicFocus,
Playlist,
Profile,
RadioSettings,
RRule,
......@@ -34,6 +35,7 @@ from program.tests.factories import (
LinkTypeFactory,
MusicFocusFactory,
OwnerFactory,
PlaylistFactory,
ProfileFactory,
RadioSettingsFactory,
RRuleFactory,
......@@ -301,3 +303,8 @@ def topic() -> Topic:
@pytest.fixture
def owner() -> User:
return OwnerFactory()
@pytest.fixture
def default_playlist(show) -> Playlist:
return PlaylistFactory(description="default playlist", show=show)
......@@ -16,6 +16,7 @@ from program.models import (
LinkType,
MusicFocus,
Note,
Playlist,
Profile,
RadioSettings,
RRule,
......@@ -167,3 +168,8 @@ class CBAFactory(DjangoModelFactory):
username = Sequence(lambda n: "username_%d" % n)
user_token = Sequence(lambda n: "user_token_%d" % n)
class PlaylistFactory(DjangoModelFactory):
class Meta:
model = Playlist
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