Permalink
Browse files

Failing test for non-unicode form label

  • Loading branch information...
1 parent d467e11 commit 88595c900225357756f9d3a6d19be871cd2e5584 @akaariai committed May 27, 2013
Showing with 13 additions and 0 deletions.
  1. +6 −0 tests/forms_tests/tests/non_unicode_forms.py
  2. +7 −0 tests/forms_tests/tests/test_forms.py
@@ -0,0 +1,6 @@
+# -*- coding: utf-8 -*-
+# Note: Intentionally no from __future__ import unicode_literals
+from django import forms
+
+class TestForm(forms.Form):
+ a_field = forms.IntegerField(label='fää')
@@ -13,6 +13,13 @@
from django.utils.safestring import mark_safe
from django.utils import six
+from .non_unicode_forms import TestForm
+
+class TestNonUnicodeLabel(TestCase):
+ def test_non_unicode_label(self):
+ tf = TestForm()
+ self.assertTrue(isinstance(tf.fields['a_field'].label, six.text_type))
+
class Person(Form):
first_name = CharField()

0 comments on commit 88595c9

Please sign in to comment.