summaryrefslogtreecommitdiff
path: root/tests/forms_tests
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2015-09-23 09:24:14 -0400
committerTim Graham <timograham@gmail.com>2015-09-23 10:26:19 -0400
commit7cb3a488436e8e7d0249280e95ba2ee945c96c87 (patch)
tree825256120b029107363fb59a5c705a4f995071da /tests/forms_tests
parent0e723ead5289f64d6fd648104c2aa741394060de (diff)
Fixed #25410 -- Fixed empty ClearableFileInput crash on Python 2.
Reverted "Fixes #24727 -- Prevented ClearableFileInput from masking exceptions on Python 2" and added a regression test. This reverts commit 5c412dd8a724b263489c1bd7a2fea381460665d7.
Diffstat (limited to 'tests/forms_tests')
-rw-r--r--tests/forms_tests/widget_tests/test_clearablefileinput.py19
1 files changed, 0 insertions, 19 deletions
diff --git a/tests/forms_tests/widget_tests/test_clearablefileinput.py b/tests/forms_tests/widget_tests/test_clearablefileinput.py
index 5a24a85e2a..4982a6e570 100644
--- a/tests/forms_tests/widget_tests/test_clearablefileinput.py
+++ b/tests/forms_tests/widget_tests/test_clearablefileinput.py
@@ -57,25 +57,6 @@ class ClearableFileInputTest(WidgetTest):
self.assertIn('my&lt;div&gt;file', output)
self.assertNotIn('my<div>file', output)
- def test_html_does_not_mask_exceptions(self):
- """
- A ClearableFileInput should not mask exceptions produced while
- checking that it has a value.
- """
- @python_2_unicode_compatible
- class FailingURLFieldFile(object):
- @property
- def url(self):
- raise RuntimeError('Canary')
-
- def __str__(self):
- return 'value'
-
- widget = ClearableFileInput()
- field = FailingURLFieldFile()
- with self.assertRaisesMessage(RuntimeError, 'Canary'):
- widget.render('myfile', field)
-
def test_clear_input_renders_only_if_not_required(self):
"""
A ClearableFileInput with is_required=False does not render a clear