funkwhale/api/funkwhale_api/favorites/factories.py

15 wiersze
394 B
Python
Czysty Zwykły widok Historia

import factory
from funkwhale_api.factories import registry
from funkwhale_api.music.factories import TrackFactory
from funkwhale_api.users.factories import UserFactory
@registry.register
class TrackFavorite(factory.django.DjangoModelFactory):
track = factory.SubFactory(TrackFactory)
user = factory.SubFactory(UserFactory)
class Meta:
2018-06-09 13:36:16 +00:00
model = "favorites.TrackFavorite"