diff options
| author | Joseph Kocherhans <joseph@jkocherhans.com> | 2007-11-06 22:25:59 +0000 |
|---|---|---|
| committer | Joseph Kocherhans <joseph@jkocherhans.com> | 2007-11-06 22:25:59 +0000 |
| commit | e29358827d1a384bac2f4590e113fc681796080a (patch) | |
| tree | 69f4f64c02066e87f6e8a2e594d0faa3a14ddc4a /tests/regressiontests/forms/util.py | |
| parent | 6f15904669f884de75dbd4cc2b2e03880d81a9a8 (diff) | |
newforms-admin: Merged to [6652]
git-svn-id: http://code.djangoproject.com/svn/django/branches/newforms-admin@6656 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests/regressiontests/forms/util.py')
| -rw-r--r-- | tests/regressiontests/forms/util.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/regressiontests/forms/util.py b/tests/regressiontests/forms/util.py index 4f81709082..bfaf73f6bc 100644 --- a/tests/regressiontests/forms/util.py +++ b/tests/regressiontests/forms/util.py @@ -42,4 +42,11 @@ u'' # Can take a mixture in a list. >>> print ValidationError(["First error.", u"Not \u03C0.", ugettext_lazy("Error.")]).messages <ul class="errorlist"><li>First error.</li><li>Not π.</li><li>Error.</li></ul> + +>>> class VeryBadError: +... def __unicode__(self): return u"A very bad error." + +# Can take a non-string. +>>> print ValidationError(VeryBadError()).messages +<ul class="errorlist"><li>A very bad error.</li></ul> """ |
