mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-02-03 13:14:28 +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
|
||||
# ------------------------------------------------------------------------------
|
||||
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-sugar==0.9.4 # https://github.com/Frozenball/pytest-sugar
|
||||
{%- if cookiecutter.use_drf == "y" %}
|
||||
|
|
|
@ -4,7 +4,7 @@ from django.contrib import messages
|
|||
from django.contrib.auth.models import AnonymousUser
|
||||
from django.contrib.messages.middleware import MessageMiddleware
|
||||
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.urls import reverse
|
||||
|
||||
|
@ -97,5 +97,6 @@ class TestUserDetailView:
|
|||
response = user_detail_view(request, username=user.username)
|
||||
login_url = reverse(settings.LOGIN_URL)
|
||||
|
||||
assert isinstance(response, HttpResponseRedirect)
|
||||
assert response.status_code == 302
|
||||
assert response.url == f"{login_url}?next=/fake-url/"
|
||||
|
|
Loading…
Reference in New Issue
Block a user