mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	Fixed #18269 -- Applied unicode_literals for Python 3 compatibility.
Thanks Vinay Sajip for the support of his django3 branch and Jannis Leidel for the review.
This commit is contained in:
		| @@ -1,4 +1,4 @@ | ||||
| from __future__ import absolute_import | ||||
| from __future__ import absolute_import, unicode_literals | ||||
|  | ||||
| from django.contrib.admindocs import views | ||||
| from django.db.models import fields as builtin_fields | ||||
| @@ -20,17 +20,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)') | ||||
|             _('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') | ||||
|             _('A custom field type') | ||||
|         ) | ||||
|         self.assertEqual( | ||||
|             views.get_readable_field_data_type(fields.DescriptionLackingField()), | ||||
|             _(u'Field of type: %(field_type)s') % { | ||||
|             _('Field of type: %(field_type)s') % { | ||||
|                 'field_type': 'DescriptionLackingField' | ||||
|             } | ||||
|         ) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user