Moved `flatatt` function tests to the util test module.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@6151 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Gary Wilson Jr 2007-09-14 02:05:45 +00:00
parent 0b1f4e3c7b
commit 8b0eaba0ee
2 changed files with 12 additions and 8 deletions

View File

@ -3795,14 +3795,6 @@ u'1'
>>> smart_unicode('foo') >>> smart_unicode('foo')
u'foo' u'foo'
# flatatt tests
>>> from django.newforms.util import flatatt
>>> flatatt({'id': "header"})
u' id="header"'
>>> flatatt({'class': "news", 'title': "Read this"})
u' class="news" title="Read this"'
>>> flatatt({})
u''
#################################### ####################################
# Test accessing errors in clean() # # Test accessing errors in clean() #

View File

@ -7,6 +7,18 @@ util_tests = r"""
>>> from django.newforms.util import * >>> from django.newforms.util import *
>>> from django.utils.translation import ugettext_lazy >>> from django.utils.translation import ugettext_lazy
###########
# flatatt #
###########
>>> from django.newforms.util import flatatt
>>> flatatt({'id': "header"})
u' id="header"'
>>> flatatt({'class': "news", 'title': "Read this"})
u' class="news" title="Read this"'
>>> flatatt({})
u''
################### ###################
# ValidationError # # ValidationError #
################### ###################