Translate fixed message in test (#4374)

This commit is contained in:
mpsantos 2023-06-08 12:41:35 -03:00 committed by GitHub
parent 135ea503e4
commit 1025d73083
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,6 +7,7 @@ from django.contrib.sessions.middleware import SessionMiddleware
from django.http import HttpRequest, HttpResponseRedirect 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
from django.utils.translation import gettext_lazy as _
from {{ cookiecutter.project_slug }}.users.forms import UserAdminChangeForm from {{ cookiecutter.project_slug }}.users.forms import UserAdminChangeForm
from {{ cookiecutter.project_slug }}.users.models import User from {{ cookiecutter.project_slug }}.users.models import User
@ -72,7 +73,7 @@ class TestUserUpdateView:
view.form_valid(form) view.form_valid(form)
messages_sent = [m.message for m in messages.get_messages(request)] 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: class TestUserRedirectView: