mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-10 03:49:24 +00:00
Make core.User
inherit from AbstractUser
instead of AbstractBaseUser
This commit is contained in:
@ -118,7 +118,9 @@ class TestUserRegistration:
|
||||
response = client.post(reverse("core:register"), valid_payload)
|
||||
|
||||
assert response.status_code == 200
|
||||
error_html = "<li>Un objet User avec ce champ Adresse email existe déjà.</li>"
|
||||
error_html = (
|
||||
"<li>Un objet Utilisateur avec ce champ Adresse email existe déjà.</li>"
|
||||
)
|
||||
assertInHTML(error_html, str(response.content.decode()))
|
||||
|
||||
def test_register_fail_with_not_existing_email(
|
||||
|
@ -14,7 +14,7 @@ from PIL import Image
|
||||
from pytest_django.asserts import assertNumQueries
|
||||
|
||||
from core.baker_recipes import board_user, old_subscriber_user, subscriber_user
|
||||
from core.models import Group, RealGroup, SithFile, User
|
||||
from core.models import Group, SithFile, User
|
||||
from sas.models import Picture
|
||||
from sith import settings
|
||||
|
||||
@ -26,12 +26,10 @@ class TestImageAccess:
|
||||
[
|
||||
lambda: baker.make(User, is_superuser=True),
|
||||
lambda: baker.make(
|
||||
User,
|
||||
groups=[RealGroup.objects.get(pk=settings.SITH_GROUP_SAS_ADMIN_ID)],
|
||||
User, groups=[Group.objects.get(pk=settings.SITH_GROUP_SAS_ADMIN_ID)]
|
||||
),
|
||||
lambda: baker.make(
|
||||
User,
|
||||
groups=[RealGroup.objects.get(pk=settings.SITH_GROUP_COM_ADMIN_ID)],
|
||||
User, groups=[Group.objects.get(pk=settings.SITH_GROUP_COM_ADMIN_ID)]
|
||||
),
|
||||
],
|
||||
)
|
||||
|
Reference in New Issue
Block a user