Ticket #18240: admindocs-test.patch

File admindocs-test.patch, 1.4 KB (added by miguel.ventura@…, 3 years ago)

patch for contrib/admindocs/tests/init.py

Line 
1*** contrib/admindocs/tests/__init__.py.orig    2012-04-30 00:37:02.000000000 +0100
2--- contrib/admindocs/tests/__init__.py 2012-04-30 00:41:39.000000000 +0100
3***************
4*** 1,6 ****
5--- 1,7 ----
6  from django.contrib.admindocs import views
7  from django.db.models import fields as builtin_fields
8  from django.utils import unittest
9+ from django.utils.translation import ugettext as _
10 
11  import fields
12 
13***************
14*** 17,23 ****
15      def test_builtin_fields(self):
16          self.assertEqual(
17              views.get_readable_field_data_type(builtin_fields.BooleanField()),
18!             u'Boolean (Either True or False)'
19          )
20 
21      def test_custom_fields(self):
22--- 18,24 ----
23      def test_builtin_fields(self):
24          self.assertEqual(
25              views.get_readable_field_data_type(builtin_fields.BooleanField()),
26!             _( u'Boolean (Either True or False)' )
27          )
28 
29      def test_custom_fields(self):
30***************
31*** 27,31 ****
32          )
33          self.assertEqual(
34              views.get_readable_field_data_type(fields.DescriptionLackingField()),
35!             u'Field of type: DescriptionLackingField'
36          )
37--- 28,34 ----
38          )
39          self.assertEqual(
40              views.get_readable_field_data_type(fields.DescriptionLackingField()),
41!             _( u"Field of type: %(field_type)s" ) % {
42!                 'field_type': u'DescriptionLackingField'
43!             }
44          )
Back to Top