factories.py 338 Bytes
Newer Older
luxcem's avatar
luxcem committed
1 2 3 4 5 6 7 8 9 10 11 12 13
import factory
from django_factory_boy import auth as auth_factories

from .models import Profile


class ProfileFactory(factory.django.DjangoModelFactory):
    class Meta:
        model = Profile

    user = factory.SubFactory(auth_factories.UserFactory)
    description = factory.Faker("text")
    picture = factory.django.ImageField()