音楽で楽しみましょう!-Let's have fun with music!-
Signed-off-by: Shin'ya Minazuki <shinyoukai@laidback.moe>
This commit is contained in:
parent
7c3206bf83
commit
54c6d22102
517 changed files with 637 additions and 639 deletions
45
api/funquail_api/common/factories.py
Normal file
45
api/funquail_api/common/factories.py
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
import factory
|
||||
|
||||
from funkwhale_api.factories import NoUpdateOnCreate, registry
|
||||
from funkwhale_api.federation import factories as federation_factories
|
||||
|
||||
|
||||
@registry.register
|
||||
class MutationFactory(NoUpdateOnCreate, factory.django.DjangoModelFactory):
|
||||
fid = factory.Faker("federation_url")
|
||||
uuid = factory.Faker("uuid4")
|
||||
created_by = factory.SubFactory(federation_factories.ActorFactory)
|
||||
summary = factory.Faker("paragraph")
|
||||
type = "update"
|
||||
|
||||
class Meta:
|
||||
model = "common.Mutation"
|
||||
|
||||
|
||||
@registry.register
|
||||
class AttachmentFactory(NoUpdateOnCreate, factory.django.DjangoModelFactory):
|
||||
url = factory.Faker("federation_url")
|
||||
uuid = factory.Faker("uuid4")
|
||||
actor = factory.SubFactory(federation_factories.ActorFactory)
|
||||
file = factory.django.ImageField()
|
||||
|
||||
class Meta:
|
||||
model = "common.Attachment"
|
||||
|
||||
|
||||
@registry.register
|
||||
class CommonFactory(NoUpdateOnCreate, factory.django.DjangoModelFactory):
|
||||
text = factory.Faker("paragraph")
|
||||
content_type = "text/plain"
|
||||
|
||||
class Meta:
|
||||
model = "common.Content"
|
||||
|
||||
|
||||
@registry.register
|
||||
class PluginConfiguration(NoUpdateOnCreate, factory.django.DjangoModelFactory):
|
||||
code = "test"
|
||||
conf = {"foo": "bar"}
|
||||
|
||||
class Meta:
|
||||
model = "common.PluginConfiguration"
|
||||
Loading…
Add table
Add a link
Reference in a new issue