Tesis 1.0.0
Loading...
Searching...
No Matches
test_auth_views.RegistroLoginTests Class Reference
Inheritance diagram for test_auth_views.RegistroLoginTests:

Public Member Functions

 setUp (self)
 test_registro_usuario_exitoso (self)
 test_login_exitoso (self)
 test_login_credenciales_invalidas (self)

Public Attributes

 client = APIClient()
 register_url = reverse('appUSERS:register')
 login_url = reverse('appUSERS:login')
dict valid_user_data
 test_user

Detailed Description

Pruebas para las vistas de registro y login

Definition at line 8 of file test_auth_views.py.

Member Function Documentation

◆ setUp()

test_auth_views.RegistroLoginTests.setUp ( self)

Definition at line 13 of file test_auth_views.py.

◆ test_login_credenciales_invalidas()

test_auth_views.RegistroLoginTests.test_login_credenciales_invalidas ( self)
Verifica que el login falla con credenciales inválidas

Definition at line 65 of file test_auth_views.py.

◆ test_login_exitoso()

test_auth_views.RegistroLoginTests.test_login_exitoso ( self)
Verifica que el login funciona correctamente con credenciales válidas

Definition at line 47 of file test_auth_views.py.

◆ test_registro_usuario_exitoso()

test_auth_views.RegistroLoginTests.test_registro_usuario_exitoso ( self)
Verifica que el registro de usuario funciona correctamente

Definition at line 36 of file test_auth_views.py.

Member Data Documentation

◆ client

test_auth_views.RegistroLoginTests.client = APIClient()

Definition at line 14 of file test_auth_views.py.

◆ login_url

test_auth_views.RegistroLoginTests.login_url = reverse('appUSERS:login')

Definition at line 16 of file test_auth_views.py.

◆ register_url

test_auth_views.RegistroLoginTests.register_url = reverse('appUSERS:register')

Definition at line 15 of file test_auth_views.py.

◆ test_user

test_auth_views.RegistroLoginTests.test_user
Initial value:
= Usuario.objects.create_user(
email='existing@example.com',
password='existingpassword123',
nombre='Existing',
apellido='User',
telefono='9876543210'
)

Definition at line 28 of file test_auth_views.py.

◆ valid_user_data

dict test_auth_views.RegistroLoginTests.valid_user_data
Initial value:
= {
'email': 'test@example.com',
'password': 'testpassword123',
'nombre': 'Usuario',
'apellido': 'Test',
'telefono': '1234567890'
}

Definition at line 19 of file test_auth_views.py.


The documentation for this class was generated from the following file: