Ticket #19016: locale.patch

File locale.patch, 1.2 KB (added by andrey@…, 12 years ago)
  • django/contrib/admindocs/tests/__init__.py

    diff --git a/django/contrib/admindocs/tests/__init__.py b/django/contrib/admindocs/tests/__init__.py
    index d28cb40..a9d443b 100644
    a b  
    11from django.contrib.admindocs import views
    22from django.db.models import fields as builtin_fields
    33from django.utils import unittest
     4from django.utils.translation import ugettext as _
    45
    56import fields
    67
    class TestFieldType(unittest.TestCase):  
    1718    def test_builtin_fields(self):
    1819        self.assertEqual(
    1920            views.get_readable_field_data_type(builtin_fields.BooleanField()),
    20             u'Boolean (Either True or False)'
     21            _(u'Boolean (Either True or False)')
    2122        )
    2223
    2324    def test_custom_fields(self):
    2425        self.assertEqual(
    2526            views.get_readable_field_data_type(fields.CustomField()),
    26             u'A custom field type'
     27            _(u'A custom field type')
    2728        )
    2829        self.assertEqual(
    2930            views.get_readable_field_data_type(fields.DescriptionLackingField()),
    30             u'Field of type: DescriptionLackingField'
     31            _(u'Field of type: %(field_type)s') % {'field_type': 'DescriptionLackingField'}
    3132        )
Back to Top