From 1025d7308362bf7094fa2303ce22b4b51f27770f Mon Sep 17 00:00:00 2001 From: mpsantos Date: Thu, 8 Jun 2023 12:41:35 -0300 Subject: [PATCH] Translate fixed message in test (#4374) --- .../{{cookiecutter.project_slug}}/users/tests/test_views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/tests/test_views.py b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/tests/test_views.py index 0cd0021f..2c102703 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/tests/test_views.py +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/tests/test_views.py @@ -7,6 +7,7 @@ from django.contrib.sessions.middleware import SessionMiddleware from django.http import HttpRequest, HttpResponseRedirect from django.test import RequestFactory from django.urls import reverse +from django.utils.translation import gettext_lazy as _ from {{ cookiecutter.project_slug }}.users.forms import UserAdminChangeForm from {{ cookiecutter.project_slug }}.users.models import User @@ -72,7 +73,7 @@ class TestUserUpdateView: view.form_valid(form) messages_sent = [m.message for m in messages.get_messages(request)] - assert messages_sent == ["Information successfully updated"] + assert messages_sent == [_("Information successfully updated")] class TestUserRedirectView: