mirror of
https://github.com/django/django.git
synced 2025-08-01 17:42:56 +00:00
Converted usage of ugettext* functions to their gettext* aliases
Thanks Tim Graham for the review.
This commit is contained in:
parent
4353640ea9
commit
c651331b34
129 changed files with 362 additions and 355 deletions
|
@ -9,7 +9,7 @@ from django.test import (
|
|||
SimpleTestCase, TestCase, TransactionTestCase, skipIfDBFeature,
|
||||
skipUnlessDBFeature,
|
||||
)
|
||||
from django.utils.translation import ugettext_lazy
|
||||
from django.utils.translation import gettext_lazy
|
||||
|
||||
from .models import Article, ArticleSelectOnSave, SelfRef
|
||||
|
||||
|
@ -310,13 +310,13 @@ class ModelTest(TestCase):
|
|||
pub_date__year=2008).extra(select={'dashed-value': '1', 'undashedvalue': '2'})
|
||||
self.assertEqual(articles[0].undashedvalue, 2)
|
||||
|
||||
def test_create_relation_with_ugettext_lazy(self):
|
||||
def test_create_relation_with_gettext_lazy(self):
|
||||
"""
|
||||
ugettext_lazy objects work when saving model instances
|
||||
gettext_lazy objects work when saving model instances
|
||||
through various methods. Refs #10498.
|
||||
"""
|
||||
notlazy = 'test'
|
||||
lazy = ugettext_lazy(notlazy)
|
||||
lazy = gettext_lazy(notlazy)
|
||||
Article.objects.create(headline=lazy, pub_date=datetime.now())
|
||||
article = Article.objects.get()
|
||||
self.assertEqual(article.headline, notlazy)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue