Skip to content

Commit

Permalink
fix: Update tests for modern Django versions.
Browse files Browse the repository at this point in the history
  • Loading branch information
cdriehuys committed Mar 24, 2023
1 parent 7b55b3c commit c69ac1d
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 73 deletions.
8 changes: 4 additions & 4 deletions example_project/example_project/urls.py
Expand Up @@ -13,14 +13,14 @@
1. Import the include() function: from django.conf.urls import url, include
2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls'))
"""
from django.conf.urls import include, url
from django.urls import include, path
from django.contrib import admin

from rest_framework.documentation import include_docs_urls


urlpatterns = [
url(r"^account/", include("rest_email_auth.urls")),
url(r"^admin/", admin.site.urls),
url(r"^docs/", include_docs_urls(title="Example Project")),
path(r"account/", include("rest_email_auth.urls")),
path(r"admin/", admin.site.urls),
path(r"docs/", include_docs_urls(title="Example Project")),
]
84 changes: 32 additions & 52 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pyproject.toml
Expand Up @@ -43,8 +43,8 @@ coverage = "5.4"
black = "23.1.0"
factory_boy = "3.2.0"
flake8 = "3.8.4"
pytest = "6.2.2"
pytest-django = "4.1.0"
pytest = "7.2.2"
pytest-django = "4.5.2"

[tool.poetry.group.docs]
optional = true
Expand Down
26 changes: 13 additions & 13 deletions rest_email_auth/urls.py
Expand Up @@ -2,7 +2,7 @@
URL configuration for the ``rest_email_auth`` app.
"""

from django.conf.urls import url
from django.urls import path

from rest_email_auth import views

Expand All @@ -11,30 +11,30 @@


urlpatterns = [
url(r"^emails/$", views.EmailListView.as_view(), name="email-list"),
url(
r"^emails/(?P<pk>[0-9]+)/$",
path(r"emails/", views.EmailListView.as_view(), name="email-list"),
path(
r"emails/<int:pk>/",
views.EmailDetailView.as_view(),
name="email-detail",
),
url(r"^register/$", views.RegistrationView.as_view(), name="register"),
url(
r"^request-password-reset/$",
path(r"register/", views.RegistrationView.as_view(), name="register"),
path(
r"request-password-reset/",
views.PasswordResetRequestView.as_view(),
name="password-reset-request",
),
url(
r"^resend-verification/$",
path(
r"resend-verification/",
views.ResendVerificationView.as_view(),
name="resend-verification",
),
url(
r"^reset-password/$",
path(
r"reset-password/",
views.PasswordResetView.as_view(),
name="password-reset",
),
url(
r"^verify-email/$",
path(
r"verify-email/",
views.EmailVerificationView.as_view(),
name="verify-email",
),
Expand Down
4 changes: 2 additions & 2 deletions test_urls.py
@@ -1,4 +1,4 @@
from django.conf.urls import include, url
from django.urls import include, path


urlpatterns = [url(r"^", include("rest_email_auth.urls"))]
urlpatterns = [path(r"", include("rest_email_auth.urls"))]

0 comments on commit c69ac1d

Please sign in to comment.