mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-07-16 11:02:22 +03:00
Update django-stubs to 1.9.0 (#3439)
Co-authored-by: Bruno Alla <alla.brunoo@gmail.com>
This commit is contained in:
parent
bc97458d41
commit
70329ecb01
|
@ -14,7 +14,7 @@ watchgod==0.7 # https://github.com/samuelcolvin/watchgod
|
||||||
# Testing
|
# Testing
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
mypy==0.910 # https://github.com/python/mypy
|
mypy==0.910 # https://github.com/python/mypy
|
||||||
django-stubs==1.8.0 # https://github.com/typeddjango/django-stubs
|
django-stubs==1.9.0 # https://github.com/typeddjango/django-stubs
|
||||||
pytest==6.2.5 # https://github.com/pytest-dev/pytest
|
pytest==6.2.5 # https://github.com/pytest-dev/pytest
|
||||||
pytest-sugar==0.9.4 # https://github.com/Frozenball/pytest-sugar
|
pytest-sugar==0.9.4 # https://github.com/Frozenball/pytest-sugar
|
||||||
{%- if cookiecutter.use_drf == "y" %}
|
{%- if cookiecutter.use_drf == "y" %}
|
||||||
|
|
|
@ -4,7 +4,7 @@ from django.contrib import messages
|
||||||
from django.contrib.auth.models import AnonymousUser
|
from django.contrib.auth.models import AnonymousUser
|
||||||
from django.contrib.messages.middleware import MessageMiddleware
|
from django.contrib.messages.middleware import MessageMiddleware
|
||||||
from django.contrib.sessions.middleware import SessionMiddleware
|
from django.contrib.sessions.middleware import SessionMiddleware
|
||||||
from django.http import HttpRequest
|
from django.http import HttpRequest, HttpResponseRedirect
|
||||||
from django.test import RequestFactory
|
from django.test import RequestFactory
|
||||||
from django.urls import reverse
|
from django.urls import reverse
|
||||||
|
|
||||||
|
@ -97,5 +97,6 @@ class TestUserDetailView:
|
||||||
response = user_detail_view(request, username=user.username)
|
response = user_detail_view(request, username=user.username)
|
||||||
login_url = reverse(settings.LOGIN_URL)
|
login_url = reverse(settings.LOGIN_URL)
|
||||||
|
|
||||||
|
assert isinstance(response, HttpResponseRedirect)
|
||||||
assert response.status_code == 302
|
assert response.status_code == 302
|
||||||
assert response.url == f"{login_url}?next=/fake-url/"
|
assert response.url == f"{login_url}?next=/fake-url/"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user