Skip to content

User Authentication and test for all scenarios#7

Merged
uxabix merged 8 commits into
developfrom
feature/registration
Oct 31, 2025
Merged

User Authentication and test for all scenarios#7
uxabix merged 8 commits into
developfrom
feature/registration

Conversation

@Viton8
Copy link
Copy Markdown
Collaborator

@Viton8 Viton8 commented Oct 21, 2025

No description provided.

@Viton8 Viton8 linked an issue Oct 21, 2025 that may be closed by this pull request
@uxabix uxabix added the enhancement New feature or request label Oct 21, 2025
@uxabix uxabix marked this pull request as draft October 23, 2025 19:48
@uxabix uxabix requested review from Surmachov and uxabix October 24, 2025 09:31
@Surmachov Surmachov marked this pull request as ready for review October 24, 2025 09:44
@uxabix uxabix marked this pull request as draft October 24, 2025 09:45
Comment thread Fools_Arena/urls.py Outdated

urlpatterns = [
path("admin/", admin.site.urls),
# UI (шаблоны)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comments must be writen on English motherfucker do you speak it???????????????????????????????

Comment thread accounts/api_views.py Outdated

class ProfileAPI(generics.RetrieveAPIView):
serializer_class = ProfileSerializer
permission_classes = [permissions.IsAuthenticated] # <-- добавляем
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comments must be writen on English motherfucker do you speak it???????????????????????????????

Comment thread accounts/tests/test_auth.py Outdated


class APIAuthTests(TestCase):
"""Тесты для API эндпоинтов"""
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comments must be writen on English motherfucker do you speak it???????????????????????????????

Comment thread accounts/tests/test_auth.py Outdated

def test_profile_requires_authentication(self):
resp = self.client.get(reverse('profile'))
self.assertEqual(resp.status_code, 302) # редирект на login
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comments must be writen on English motherfucker do you speak it???????????????????????????????

Comment thread accounts/tests/test_auth.py Outdated


class TemplateAuthTests(TestCase):
"""Тесты для шаблонных (UI) вьюх"""
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comments must be writen on English motherfucker do you speak it???????????????????????????????

Repository owner deleted a comment from Surmachov Oct 24, 2025
Repository owner deleted a comment from Surmachov Oct 24, 2025
Repository owner deleted a comment from Surmachov Oct 24, 2025
Repository owner deleted a comment from Surmachov Oct 24, 2025
Repository owner deleted a comment from Surmachov Oct 24, 2025
Repository owner deleted a comment from Surmachov Oct 24, 2025
Repository owner deleted a comment from Surmachov Oct 24, 2025
Repository owner deleted a comment from Surmachov Oct 24, 2025
Repository owner deleted a comment from Surmachov Oct 24, 2025
Repository owner deleted a comment from Surmachov Oct 24, 2025
Repository owner deleted a comment from Surmachov Oct 24, 2025
Repository owner deleted a comment from Surmachov Oct 24, 2025
Repository owner deleted a comment from Surmachov Oct 24, 2025
Repository owner deleted a comment from Surmachov Oct 24, 2025
Repository owner deleted a comment from Surmachov Oct 24, 2025
Repository owner deleted a comment from Surmachov Oct 24, 2025
Repository owner deleted a comment from Surmachov Oct 24, 2025
Repository owner deleted a comment from Surmachov Oct 24, 2025
Repository owner deleted a comment from Surmachov Oct 24, 2025
Repository owner deleted a comment from Surmachov Oct 24, 2025
Repository owner deleted a comment from Surmachov Oct 24, 2025
Repository owner deleted a comment from Surmachov Oct 24, 2025
Repository owner deleted a comment from Surmachov Oct 24, 2025
Repository owner deleted a comment from Surmachov Oct 24, 2025
Repository owner deleted a comment from Surmachov Oct 24, 2025
Comment thread Fools_Arena/urls.py Outdated
path('accounts/', include('accounts.urls')),

# API
path('api/', include('accounts.api_urls')),
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replace with path('api/accounts', include('accounts.api_urls')),

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed

Comment thread accounts/api_urls.py
Comment thread accounts/api_views.py Outdated
Comment thread accounts/api_views.py
Comment thread accounts/templates/accounts/login.html Outdated
Repository owner deleted a comment from DevCheck-StockholmUni Oct 24, 2025
@uxabix uxabix marked this pull request as ready for review October 29, 2025 15:42
@uxabix uxabix requested review from Surmachov and uxabix October 29, 2025 15:43
Copy link
Copy Markdown
Owner

@uxabix uxabix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previously requested changes

Copy link
Copy Markdown
Owner

@uxabix uxabix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

base.html, fix requested previously in main urls.py, comments, PEP8

Comment thread accounts/views.py Outdated
Comment thread accounts/views.py
Comment thread accounts/serializers.py Outdated
Comment thread accounts/tests/test_auth.py Outdated
Comment thread accounts/tests/test_auth.py Outdated
Copy link
Copy Markdown
Collaborator

@Surmachov Surmachov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

View uxabix comments and fix what he said.😘

Comment thread Fools_Arena/urls.py Outdated
path('accounts/', include('accounts.urls')),

# API
path('api/', include('accounts.api_urls')),
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed

Comment thread accounts/api_urls.py
Comment thread accounts/api_views.py
Comment thread accounts/serializers.py Outdated
Comment thread accounts/api_urls.py
Comment thread accounts/api_views.py
Copy link
Copy Markdown
Collaborator

@Surmachov Surmachov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make changes what uxabix requested. 🤑

Viton8 and others added 2 commits October 31, 2025 20:30
Updated docstrings for authentication tests to provide clearer explanations of each test case, including details about expected behavior and parameters.
@uxabix uxabix merged commit 169d411 into develop Oct 31, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

User Authentication and Profile Management

3 participants