def setUp(self): self.client.login(username='******', password='******') class UserProfileModerator(GenericModerator): fields_exclude = ['url'] setup_moderation([(UserProfile, UserProfileModerator)])
def setUp(self): self.moderation = ModerationManager() class ModelWithMultipleManagersModerator(GenericModerator): manager_names = ['objects', 'men', 'women'] setup_moderation([(ModelWithMultipleManagers, ModelWithMultipleManagersModerator)])
def setUp(self): class UserProfileModerator(GenericModerator): visibility_column = "is_public" self.moderation = setup_moderation([(ModelWithVisibilityField, UserProfileModerator)]) self.user = User.objects.get(username="******")
def setUp(self): class UserProfileModerator(GenericModerator): bypass_moderation_after_approval = True self.moderation = setup_moderation([(UserProfile, UserProfileModerator)]) self.user = User.objects.get(username="******") self.profile = UserProfile.objects.get(user__username="******")
def setUp(self): class UserProfileModerator(GenericModerator): visibility_column = 'is_public' self.moderation = setup_moderation([(ModelWithVisibilityField, UserProfileModerator)]) self.user = User.objects.get(username='******')
def setUp(self): class UserProfileModerator(GenericModerator): bypass_moderation_after_approval = True self.moderation = setup_moderation([(UserProfile, UserProfileModerator) ]) self.user = User.objects.get(username='******') self.profile = UserProfile.objects.get(user__username='******')
def setUp(self): class UserProfileModerator(GenericModerator): notify_moderator = False self.moderation = setup_moderation([(UserProfile, UserProfileModerator)]) self.moderation._disconnect_signals(UserProfile) self.user = User.objects.get(username='******') self.profile = UserProfile.objects.get(user__username='******')
def setUp(self): self.user = User.objects.get(username='******') class ModeratedObjectForm(BaseModeratedObjectForm): class Meta: model = UserProfile self.ModeratedObjectForm = ModeratedObjectForm self.moderation = setup_moderation([UserProfile])
def setUp(self): from django.db.models import signals self.user = User.objects.get(username='******') self.profile = UserProfile.objects.get(user__username='******') class UserProfileModerator(GenericModerator): visibility_column = 'is_public' self.moderation = setup_moderation([UserProfile, (ModelWithVisibilityField, UserProfileModerator)])
def setUp(self): self.user = User.objects.get(username='******') class ModeratedObjectForm(BaseModeratedObjectForm): extra = CharField(required=False) class Meta: model = UserProfile self.ModeratedObjectForm = ModeratedObjectForm self.moderation = setup_moderation([UserProfile])
def setUp(self): from django.db.models import signals self.user = User.objects.get(username='******') self.profile = UserProfile.objects.get(user__username='******') class UserProfileModerator(GenericModerator): visibility_column = 'is_public' self.moderation = setup_moderation( [UserProfile, (ModelWithVisibilityField, UserProfileModerator)])
def setUp(self): class UserProfileModerator(GenericModerator): notify_moderator = False self.moderation = setup_moderation([(UserProfile, UserProfileModerator) ]) self.moderation._disconnect_signals(UserProfile) self.user = User.objects.get(username='******') self.profile = UserProfile.objects.get(user__username='******')
def setUp(self): self.moderation = setup_moderation([UserProfile]) rf = RequestFactory() rf.login(username="******", password="******") self.request = rf.get("/admin/moderation/") self.request.user = User.objects.get(username="******") self.admin = ModerationAdmin(UserProfile, site) self.profile = UserProfile.objects.get(user__username="******") self.moderated_obj = ModeratedObject(content_object=self.profile) self.moderated_obj.save()
def setUp(self): self.moderation = setup_moderation([UserProfile]) rf = RequestFactory() rf.login(username='******', password='******') self.request = rf.get('/admin/moderation/') self.request.user = User.objects.get(username='******') self.request._messages = mock.Mock() self.admin = ModerationAdmin(UserProfile, site) self.profile = UserProfile.objects.get(user__username='******') self.moderated_obj = ModeratedObject(content_object=self.profile) self.moderated_obj.save()
def setUp(self): rf = RequestFactory() rf.login(username='******', password='******') self.request = rf.get('/admin/moderation/') self.request.user = User.objects.get(username='******') self.admin = ModeratedObjectAdmin(ModeratedObject, site) self.moderation = setup_moderation([User]) for user in User.objects.all(): ModeratedObject(content_object=user).save() self.moderated_objects = ModeratedObject.objects.all()
def setUp(self): rf = RequestFactory() rf.login(username="******", password="******") self.request = rf.get("/admin/moderation/") self.request.user = User.objects.get(username="******") self.admin = ModeratedObjectAdmin(ModeratedObject, site) self.moderation = setup_moderation([User]) for user in User.objects.all(): ModeratedObject(content_object=user).save() self.moderated_objects = ModeratedObject.objects.all()
def setUp(self): from moderation.tests import setup_moderation rf = RequestFactory() rf.login(username='******', password='******') self.request = rf.get('/admin/moderation/') self.request.user = User.objects.get(username='******') self.admin = ModerationAdmin(UserProfile, site) models = [ModelWithSlugField, ModelWithSlugField2] self.moderation = setup_moderation(models) self.m1 = ModelWithSlugField(slug='test') self.m1.save() self.m2 = ModelWithSlugField2(slug='test') self.m2.save()
def setUp(self): from moderation.tests import setup_moderation rf = RequestFactory() rf.login(username='******', password='******') self.request = rf.get('/admin/moderation/') self.request.user = User.objects.get(username='******') self.admin = ModerationAdmin(UserProfile, site) models = [ModelWithSlugField2, ModelWithSlugField] self.moderation = setup_moderation(models) self.m1 = ModelWithSlugField(slug='test') self.m1.save() self.m2 = ModelWithSlugField2(slug='test') self.m2.save()
def setUp(self): self.moderation = setup_moderation([ModelWithSlugField])
def setUp(self): self.user = User.objects.get(username='******') self.profile = UserProfile.objects.get(user__username='******') self.moderation = setup_moderation([UserProfile])
def setUp(self): self.moderation = setup_moderation() self.user = User.objects.get(username='******')
def setUp(self): setup_moderation([ModelWithModeratedFields])
def setUp(self): setup_moderation([UserProfile]) self.user = User.objects.get(username='******')
def setUp(self): setup_moderation()
def setUp(self): self.moderation = setup_moderation([UserProfile, ModelWithSlugField2]) self.user = User.objects.get(username='******')
def setUp(self): setup_moderation([UserProfile])
def setUp(self): self.moderation = setup_moderation()