Ticket #3314: forms_test.diff

File forms_test.diff, 893 bytes (added by nesh <nesh [at] studioquattro [dot] co [dot] yu>, 18 years ago)

test case

  • www-libs/django/tests/regressiontests/forms/tests.py

     
    44>>> import datetime
    55>>> import re
    66
     7# smart_unicode tests
     8>>> from django.newforms.util import smart_unicode
     9>>> class Test:
     10...     def __str__(self):
     11...        return 'ŠĐĆŽćžšđ'
     12>>> class TestU:
     13...     def __str__(self):
     14...        return 'Foo'
     15...     def __unicode__(self):
     16...        return u'\u0160\u0110\u0106\u017d\u0107\u017e\u0161\u0111'
     17>>> smart_unicode(Test())
     18u'\u0160\u0110\u0106\u017d\u0107\u017e\u0161\u0111'
     19>>> smart_unicode(TestU())
     20u'\u0160\u0110\u0106\u017d\u0107\u017e\u0161\u0111'
     21>>> smart_unicode(1)
     22u'1'
     23
    724###########
    825# Widgets #
    926###########
Back to Top