diff --git a/app/user/tests/test_user_api.py b/app/user/tests/test_user_api.py index c16ba5d..f16f781 100644 --- a/app/user/tests/test_user_api.py +++ b/app/user/tests/test_user_api.py @@ -132,10 +132,10 @@ def test_retrieve_profile_success(self): """Test retrieving profile for logged in user.""" res = self.client.get(ME_URL) - self.assertEqual(res.status, status.HTTP_200_OK) + self.assertEqual(res.status_code, status.HTTP_200_OK) self.assertEqual(res.data, { 'name': self.user.name, - 'email': self.user.password, + 'email': self.user.email, }) def test_post_me_not_allowed(self): diff --git a/app/user/views.py b/app/user/views.py index 558d626..290735a 100644 --- a/app/user/views.py +++ b/app/user/views.py @@ -23,7 +23,7 @@ class ManageUserView(generics.RetrieveUpdateAPIView): """Manage the authenticated user.""" serializer_class = UserSerializer authentication_classes = [authentication.TokenAuthentication] - permissions = [permissions.IsAuthenticated] + permission_classes = [permissions.IsAuthenticated] def get_object(self): """Retrieve and return the authenticated user."""