File: test_hidden.py

package info (click to toggle)
wtforms 3.2.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,064 kB
  • sloc: python: 5,264; makefile: 27; sh: 17
file content (12 lines) | stat: -rw-r--r-- 287 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
from wtforms.fields import HiddenField
from wtforms.form import Form


class F(Form):
    a = HiddenField(default="LE DEFAULT")


def test_hidden_field():
    form = F()
    assert form.a() == """<input id="a" name="a" type="hidden" value="LE DEFAULT">"""
    assert form.a.flags.hidden