# coding: utf-8 """ Tests for newforms/util.py module. """ util_tests = r""" >>> from django.newforms.util import * >>> 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 # ################### # Can take a string. >>> print ValidationError("There was an error.").messages