|
|
|
|
@ -55,3 +55,20 @@ def test_generate_password_by_manager(mocked_send_mail, staff_client, |
|
|
|
|
data=wrong_email, |
|
|
|
|
status=status.HTTP_400_BAD_REQUEST |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@pytest.mark.django_db |
|
|
|
|
def test_generate_password_by_manager_for_not_active_student(staff_client, |
|
|
|
|
user_not_active_student): |
|
|
|
|
""" |
|
|
|
|
Test generate new password from admin area by manager for not active student |
|
|
|
|
""" |
|
|
|
|
|
|
|
|
|
data = { |
|
|
|
|
'email': user_not_active_student.email, |
|
|
|
|
} |
|
|
|
|
assert staff_client.post( |
|
|
|
|
reverse('users:management-password'), |
|
|
|
|
data=data, |
|
|
|
|
status=status.HTTP_400_BAD_REQUEST |
|
|
|
|
) |
|
|
|
|
|