Skip to content

Commit

Permalink
Add comment to explain overriding of ROOT_URLConf
Browse files Browse the repository at this point in the history
  • Loading branch information
g-kartik committed Dec 29, 2021
1 parent 62e0db6 commit 2245f67
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cvat/apps/iam/tests/test_rest_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
from django.urls import path, re_path
from allauth.account.views import ConfirmEmailView, EmailVerificationSentView


urlpatterns = iam_url_patterns + [
re_path(r'^account-confirm-email/(?P<key>[-:\w]+)/$', ConfirmEmailView.as_view(),
name='account_confirm_email'),
Expand Down Expand Up @@ -50,6 +49,8 @@ def test_register_account_with_email_verification(self):
"""
Ensure we can register a user and it does not return auth token key when email verification is turned on
"""
# Since override settings is loaded after URLConf, 'account_confirm_email' url is not loaded, so we need to
# override ROOT_URLCONF fix the issue
response = self.get_register_response()
self.assertEqual(response.status_code, status.HTTP_201_CREATED)
self.assertEqual(response.data, {'first_name': 'test_first', 'last_name': 'test_last',
Expand Down

0 comments on commit 2245f67

Please sign in to comment.