From 08bec4fbc10ca5638ad22f20a753ec5e8d92eb0e Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Wed, 7 Dec 2011 23:08:27 +0000 Subject: Changed BoundField.subwidgets() to return SubWidget objects instead of rendered strings. This means we can access individual radio buttons' properties in the template (see new docs) git-svn-id: http://code.djangoproject.com/svn/django/trunk@17175 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- tests/regressiontests/forms/tests/forms.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/regressiontests/forms') diff --git a/tests/regressiontests/forms/tests/forms.py b/tests/regressiontests/forms/tests/forms.py index e456c38a38..4e9cc16f23 100644 --- a/tests/regressiontests/forms/tests/forms.py +++ b/tests/regressiontests/forms/tests/forms.py @@ -439,7 +439,7 @@ class FormsTestCase(TestCase): name = ChoiceField(choices=[('john', 'John'), ('paul', 'Paul'), ('george', 'George'), ('ringo', 'Ringo')], widget=RadioSelect) f = BeatleForm(auto_id=False) - self.assertEqual('\n'.join(list(f['name'])), """ + self.assertEqual('\n'.join([str(bf) for bf in f['name']]), """ """) @@ -454,7 +454,7 @@ class FormsTestCase(TestCase): name = CharField() f = BeatleForm(auto_id=False) - self.assertEqual('\n'.join(list(f['name'])), u'') + self.assertEqual('\n'.join([str(bf) for bf in f['name']]), u'') def test_forms_with_multiple_choice(self): # MultipleChoiceField is a special case, as its data is required to be a list: -- cgit v1.3