diff --git a/core/templates/core/login.jinja b/core/templates/core/login.jinja index 833a3431..d696f4cd 100644 --- a/core/templates/core/login.jinja +++ b/core/templates/core/login.jinja @@ -33,7 +33,6 @@ {% endif %} {% csrf_token %} - {% render_honeypot_field %}
Votre nom d\'utilisateur ' "et votre mot de passe ne correspondent pas. Merci de réessayer.
" ) in str(response.content.decode()) - - def test_login_honeypot(self, client, user): - response = client.post( - reverse("core:login"), - { - "username": user.username, - "password": "wrong-password", - settings.HONEYPOT_FIELD_NAME: settings.HONEYPOT_VALUE + "incorrect", - }, - ) - assert response.status_code == 200 assert response.wsgi_request.user.is_anonymous def test_login_success(self, client, user): """Should login a user correctly.""" response = client.post( reverse("core:login"), - { - "username": user.username, - "password": "plop", - settings.HONEYPOT_FIELD_NAME: settings.HONEYPOT_VALUE, - }, + {"username": user.username, "password": "plop"}, ) assertRedirects(response, reverse("core:index")) assert response.wsgi_request.user == user diff --git a/core/views/user.py b/core/views/user.py index 98ebcce6..e9694a92 100644 --- a/core/views/user.py +++ b/core/views/user.py @@ -77,7 +77,6 @@ from subscription.models import Subscription from trombi.views import UserTrombiForm -@method_decorator(check_honeypot, name="post") class SithLoginView(views.LoginView): """The login View."""