summaryrefslogtreecommitdiff
path: root/tests/regressiontests/forms/widgets.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/regressiontests/forms/widgets.py')
-rw-r--r--tests/regressiontests/forms/widgets.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/regressiontests/forms/widgets.py b/tests/regressiontests/forms/widgets.py
index 1c3e873963..6b7c858041 100644
--- a/tests/regressiontests/forms/widgets.py
+++ b/tests/regressiontests/forms/widgets.py
@@ -276,6 +276,12 @@ u'<input type="checkbox" name="greeting" />'
>>> w.render('greeting', None)
u'<input type="checkbox" name="greeting" />'
+The CheckboxInput widget will return False if the key is not found in the data
+dictionary (because HTML form submission doesn't send any result for unchecked
+checkboxes).
+>>> w.value_from_datadict({}, {}, 'testing')
+False
+
# Select Widget ###############################################################
>>> w = Select()