update: use settings.AUTH_USER_MODEL
This commit is contained in:
parent
eb1d32285e
commit
1973ae5b57
@ -1,6 +1,7 @@
|
||||
import factory
|
||||
from django.conf import settings
|
||||
|
||||
from .models import Notification
|
||||
from django.contrib.auth.models import User
|
||||
from django.db.models.signals import post_save
|
||||
|
||||
@factory.django.mute_signals(post_save)
|
||||
@ -11,7 +12,7 @@ class NotificationFactory(factory.django.DjangoModelFactory):
|
||||
type = factory.Faker('text', max_nb_chars=50)
|
||||
summary = factory.Faker('paragraph', nb_sentences=3, variable_nb_sentences=True)
|
||||
author_user = factory.Faker('url')
|
||||
user = factory.Iterator(User.objects.all())
|
||||
user = factory.Iterator(settings.AUTH_USER_MODEL.objects.all())
|
||||
date = factory.Faker('past_datetime')
|
||||
read = factory.Faker('boolean')
|
||||
object = factory.Faker('url')
|
Loading…
Reference in New Issue
Block a user