Skip to content

Commit a1df3fc

Browse files
committed
Add basic placeholder for confirm-email endpoint.
1 parent dd7dc24 commit a1df3fc

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

backend/user_service/users/tests/test_drf_views.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from django.conf import settings
55
from django.core import mail
66
from django.forms.models import model_to_dict
7+
from rest_framework.response import Response
78
from rest_framework.test import APIRequestFactory
89

910
from users.models import User
@@ -120,7 +121,13 @@ def test_password_reset_link_success(self, api_client_factory, url_factory, user
120121
assert mail.outbox[0].to[0] == data['email']
121122

122123
class TestCustomPasswordResetFromKey:
123-
def test_custom_reset_password(self, url_factory):
124+
125+
@patch('allauth.account.models.get_emailconfirmation_model')
126+
@patch('allauth.account.internal.flows.email_verification.verify_email_indirectly', return_value=Response(
127+
{"detail": "Email verified successfully."}
128+
))
129+
@pytest.mark.django_db
130+
def test_custom_reset_password(self, mock_verify_email, mock_get_email_confirmation_model, api_client_factory, url_factory, user_factory):
124131
pass
125132

126133

0 commit comments

Comments
 (0)