la-chariotte/la_chariotte/helpers/fixtures.py

18 lines
516 B
Python

import pytest
@pytest.fixture
def client_log(client, django_user_model):
username = "test@user.fr"
password = "azertypassword"
user = django_user_model.objects.create_user(username=username, password=password)
client.login(username=username, password=password)
return client
@pytest.fixture
def other_user(django_user_model):
username = "other@user.fr"
password = "azertypassword"
user = django_user_model.objects.create_user(username=username, password=password)
return user