From 1973ae5b572ace3ccc5f79e5a93d1b30614458d3 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Date: Wed, 17 Apr 2019 12:32:35 +0200 Subject: [PATCH] update: use settings.AUTH_USER_MODEL --- djangoldp_notification/factories.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/djangoldp_notification/factories.py b/djangoldp_notification/factories.py index 1910325..d3c985d 100644 --- a/djangoldp_notification/factories.py +++ b/djangoldp_notification/factories.py @@ -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') \ No newline at end of file