mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	Fixed #18240 -- Made admindocs tests pass even when language is not en.
Thanks miguel.ventura@gmail.com for the report and the patch.
This commit is contained in:
		| @@ -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 @@ class TestFieldType(unittest.TestCase): | ||||
|     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' | ||||
|             } | ||||
|         ) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user