mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-04 09:49:16 +02:00
Fixed #54: Now use pytest everywhere \o/
This commit is contained in:
parent
a7758395ee
commit
099cdfa99c
65 changed files with 1466 additions and 1467 deletions
15
api/funkwhale_api/favorites/factories.py
Normal file
15
api/funkwhale_api/favorites/factories.py
Normal file
|
@ -0,0 +1,15 @@
|
|||
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:
|
||||
model = 'favorites.TrackFavorite'
|
Loading…
Add table
Add a link
Reference in a new issue