Commit 4d00bba4 authored by Jean-Baptiste's avatar Jean-Baptiste

fix: factories

parent 524f7f05
Pipeline #2028 passed with stage
in 27 seconds
import factory
import hashlib
from .models import Account, ChatConfig, ChatProfile
from .models import Account, ChatProfile
from django.db.models.signals import post_save
from djangoldp.factories import UserFactory
......@@ -20,18 +20,11 @@ class AccountFactory(factory.django.DjangoModelFactory):
self.picture = "https://www.gravatar.com/avatar/%s" % emailMd5
self.save()
@factory.django.mute_signals(post_save)
class ChatConfigFactory(factory.django.DjangoModelFactory):
class Meta:
model = ChatConfig
jabberID = factory.Faker('uuid4')
jabberRoom = factory.Faker('boolean')
@factory.django.mute_signals(post_save)
class ChatProfileFactory(factory.django.DjangoModelFactory):
class Meta:
model = ChatProfile
user = factory.SubFactory(UserFactory)
config = factory.SubFactory(ChatConfigFactory)
jabberID = factory.Faker('email')
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment