diff options
| author | Andrey Lebedev <andrey@lebedev.lt> | 2013-03-22 17:05:09 +0200 |
|---|---|---|
| committer | Andrey Lebedev <andrey@lebedev.lt> | 2013-03-22 17:12:47 +0200 |
| commit | f940e9f83c8cd3f9c51bc60a1cd9b582dd9fa395 (patch) | |
| tree | cdc28e9b2c2af00d226720a49a0cb6fdf19fad4d /tests/test_forms.py | |
| parent | ced890ac4cd10c9cbfca2c7540c329c53ded6eb6 (diff) | |
| download | webtest-f940e9f83c8cd3f9c51bc60a1cd9b582dd9fa395.tar.gz | |
All <button> elements are treated as submit controls
Diffstat (limited to 'tests/test_forms.py')
| -rw-r--r-- | tests/test_forms.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/test_forms.py b/tests/test_forms.py index 520e7c2..b759a01 100644 --- a/tests/test_forms.py +++ b/tests/test_forms.py @@ -12,7 +12,7 @@ from six import PY3 from webob import Request from webtest.debugapp import DebugApp from webtest.compat import to_bytes -from webtest.forms import NoValue +from webtest.forms import NoValue, Submit from tests.compat import unittest from tests.compat import u @@ -33,6 +33,12 @@ class TestForms(unittest.TestCase): 'foo' ) + def test_button(self): + form = self.callFUT() + button = form['button'] + self.assertTrue(isinstance(button, Submit), + "<button> without type is a submit button") + def test_force_select(self): form = self.callFUT() form['select'].force_value('notavalue') |
