summaryrefslogtreecommitdiff
path: root/tests/model_forms/tests.py
diff options
context:
space:
mode:
authorPreston Timmons <prestontimmons@gmail.com>2016-12-27 17:00:56 -0500
committerTim Graham <timograham@gmail.com>2016-12-27 17:50:10 -0500
commitb52c73008a9d67e9ddbb841872dc15cdd3d6ee01 (patch)
treeb58a2d18242db5234b18678116e07e6f6bbc7cb3 /tests/model_forms/tests.py
parent51cde873d9fc8e4540f4efecbd39cfe8e770be38 (diff)
Fixed #15667 -- Added template-based widget rendering.
Thanks Carl Meyer and Tim Graham for contributing to the patch.
Diffstat (limited to 'tests/model_forms/tests.py')
-rw-r--r--tests/model_forms/tests.py9
1 files changed, 1 insertions, 8 deletions
diff --git a/tests/model_forms/tests.py b/tests/model_forms/tests.py
index 84aa04b40f..f03b4433a8 100644
--- a/tests/model_forms/tests.py
+++ b/tests/model_forms/tests.py
@@ -1651,13 +1651,6 @@ class ModelChoiceFieldTests(TestCase):
with self.assertNumQueries(1):
template.render(Context({'field': field}))
- def test_modelchoicefield_index_renderer(self):
- field = forms.ModelChoiceField(Category.objects.all(), widget=forms.RadioSelect)
- self.assertEqual(
- str(field.widget.get_renderer('foo', [])[0]),
- '<label><input name="foo" type="radio" value="" /> ---------</label>'
- )
-
def test_disabled_modelchoicefield(self):
class ModelChoiceForm(forms.ModelForm):
author = forms.ModelChoiceField(Author.objects.all(), disabled=True)
@@ -2115,7 +2108,7 @@ class FileAndImageFieldTests(TestCase):
doc = Document.objects.create()
form = DocumentForm(instance=doc)
- self.assertEqual(
+ self.assertHTMLEqual(
str(form['myfile']),
'<input id="id_myfile" name="myfile" type="file" />'
)