Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed #18240 -- Made admindocs tests pass even when language is not en.

Thanks miguel.ventura@gmail.com for the report and the patch.
  • Loading branch information...
commit eba4197c71d152b30ddfe48e9dfbbd88f1ffd104 1 parent d5a277b
@claudep claudep authored
Showing with 6 additions and 3 deletions.
  1. +6 −3 django/contrib/admindocs/tests/__init__.py
View
9 django/contrib/admindocs/tests/__init__.py
@@ -1,6 +1,7 @@
from django.contrib.admindocs import views
from django.db.models import fields as builtin_fields
from django.utils import unittest
+from django.utils.translation import ugettext as _
import fields
@@ -17,15 +18,17 @@ def test_field_name(self):
def test_builtin_fields(self):
self.assertEqual(
views.get_readable_field_data_type(builtin_fields.BooleanField()),
- u'Boolean (Either True or False)'
+ _(u'Boolean (Either True or False)')
)
def test_custom_fields(self):
self.assertEqual(
views.get_readable_field_data_type(fields.CustomField()),
- u'A custom field type'
+ _(u'A custom field type')
)
self.assertEqual(
views.get_readable_field_data_type(fields.DescriptionLackingField()),
- u'Field of type: DescriptionLackingField'
+ _(u'Field of type: %(field_type)s') % {
+ 'field_type': 'DescriptionLackingField'
+ }
)
Please sign in to comment.
Something went wrong with that request. Please try again.