mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-04 20:29:32 +02:00
ImportRequest factory
This commit is contained in:
parent
3fa7d0009e
commit
8900f5581b
1 changed files with 15 additions and 0 deletions
15
api/funkwhale_api/requests/factories.py
Normal file
15
api/funkwhale_api/requests/factories.py
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
import factory
|
||||||
|
|
||||||
|
from funkwhale_api.factories import registry
|
||||||
|
from funkwhale_api.users.factories import UserFactory
|
||||||
|
|
||||||
|
|
||||||
|
@registry.register
|
||||||
|
class ImportRequestFactory(factory.django.DjangoModelFactory):
|
||||||
|
artist_name = factory.Faker('name')
|
||||||
|
albums = factory.Faker('sentence')
|
||||||
|
user = factory.SubFactory(UserFactory)
|
||||||
|
comment = factory.Faker('paragraph')
|
||||||
|
|
||||||
|
class Meta:
|
||||||
|
model = 'requests.ImportRequest'
|
Loading…
Add table
Add a link
Reference in a new issue