Attributes model added.
This commit is contained in:
@@ -40,9 +40,8 @@ def sms_code(test_user):
|
||||
def test_reg_view(api_client):
|
||||
data = {
|
||||
"phone": "998999999991",
|
||||
"first_name": "John",
|
||||
"last_name": "Doe",
|
||||
"password": "password",
|
||||
"confirm_password":"password"
|
||||
}
|
||||
with patch.object(SmsService, "send_confirm", return_value=True):
|
||||
response = api_client.post(reverse("auth-register"), data=data)
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import uuid
|
||||
from typing import Type
|
||||
|
||||
from rest_framework.authentication import TokenAuthentication
|
||||
|
||||
from core.services import UserService, SmsService
|
||||
from django.contrib.auth import get_user_model
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
@@ -186,6 +188,7 @@ class MeView(BaseViewSetMixin, GenericViewSet, UserService):
|
||||
class ChangePasswordView(BaseViewSetMixin, GenericViewSet):
|
||||
serializer_class = ChangePasswordSerializer
|
||||
permission_classes = (IsAuthenticated,)
|
||||
authentication_classes = [TokenAuthentication]
|
||||
|
||||
@extend_schema(
|
||||
request=serializer_class,
|
||||
|
||||
Reference in New Issue
Block a user