Don't test to add users since registration is disabled

This commit is contained in:
Yohann D'ANELLO 2021-11-14 14:32:28 +01:00
parent 34766257b3
commit e75f04b530
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85
1 changed files with 0 additions and 17 deletions

View File

@ -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)