<s> from wtforms . validators import NumberRange <EOL> from tests import FieldTestCase , MultiDict <EOL> from wtforms_components import DecimalField <EOL> from wtforms_components . widgets import NumberInput <EOL> class TestDecimalField ( FieldTestCase ) : <EOL> field_class = DecimalField <EOL> def test_assigns_min_and_max ( self ) : <EOL> form_class = self . init_form ( <EOL> validators = [ NumberRange ( min = <NUM_LIT:2> , max = <NUM_LIT:10> ) ] <EOL> ) <EOL> form = form_class ( MultiDict ( test_field = <NUM_LIT:3> ) ) <EOL> assert str ( form . test_field ) == ( <EOL> '<STR_LIT>' <EOL> '<STR_LIT>' <EOL> ) <EOL> def test_assigns_step ( self ) : <EOL> form_class = self . init_form ( <EOL> widget = NumberInput ( step = '<STR_LIT>' ) <EOL> ) <EOL> form = form_class ( MultiDict ( test_field = <NUM_LIT:3> ) ) <EOL> assert str ( form . test_field ) == ( <EOL> '<STR_LIT>' <EOL> '<STR_LIT>' <EOL> ) </s>
