From e75f04b53014ebe6bd299bc58e42622e48340e6b Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Sun, 14 Nov 2021 14:32:28 +0100 Subject: [PATCH] Don't test to add users since registration is disabled --- users/tests/test_templates.py | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/users/tests/test_templates.py b/users/tests/test_templates.py index e736c0d..66879e5 100644 --- a/users/tests/test_templates.py +++ b/users/tests/test_templates.py @@ -1,7 +1,6 @@ # -*- mode: python; coding: utf-8 -*- # SPDX-License-Identifier: GPL-3.0-or-later -from django.core import mail from django.test import TestCase from django.urls import reverse from users.models import User @@ -23,19 +22,3 @@ class TemplateTests(TestCase): def test_users_user_changelist(self): response = self.client.get(reverse('admin:users_user_changelist')) self.assertEqual(response.status_code, 200) - - def test_users_user_add_init_mail(self): - """ - Test that an initialization mail is send when a new user is added - """ - data = { - 'username': "test_user", - 'email': "test@example.com", - 'first_name': "Test", - 'last_name': "User", - } - response = self.client.post(reverse( - 'admin:users_user_add', - ), data=data) - self.assertEqual(len(mail.outbox), 1) - self.assertEqual(response.status_code, 302)