funkwhale/api/funkwhale_api/requests/factories.py

16 wiersze
420 B
Python
Czysty Zwykły widok Historia

2018-02-20 23:03:05 +00:00
import factory
from funkwhale_api.factories import registry
from funkwhale_api.users.factories import UserFactory
@registry.register
class ImportRequestFactory(factory.django.DjangoModelFactory):
2018-06-09 13:36:16 +00:00
artist_name = factory.Faker("name")
albums = factory.Faker("sentence")
2018-02-20 23:03:05 +00:00
user = factory.SubFactory(UserFactory)
2018-06-09 13:36:16 +00:00
comment = factory.Faker("paragraph")
2018-02-20 23:03:05 +00:00
class Meta:
2018-06-09 13:36:16 +00:00
model = "requests.ImportRequest"