def test_should_strip_value(self): string_field = StringField(trim=True) result = string_field.clean(request=None, value=' asd ') assert result == 'asd'
def test_should_strip_value_for_given_characters(self): string_field = StringField(trim=' ') result = string_field.clean(request=None, value=' asd ') assert result == 'asd'
def test_should_not_strip_value(self): string_field = StringField() result = string_field.clean(request=None, value=" asd ") assert result == ' asd '