-
-
Notifications
You must be signed in to change notification settings - Fork 395
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
aa4e043
commit 7818c80
Showing
4 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from wtforms import widgets | ||
from wtforms.fields import ColorField | ||
from wtforms.form import Form | ||
|
||
|
||
class F(Form): | ||
a = ColorField( | ||
widget=widgets.ColorInput(), default="#ff0000" | ||
) | ||
b = ColorField(default="#00ff00") | ||
|
||
|
||
def test_color_field(): | ||
form = F() | ||
assert form.a() == """<input id="a" name="a" type="color" value="#ff0000">""" | ||
assert form.b() == """<input id="b" name="b" type="color" value="#00ff00">""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters