def test_none_required(self): field = Boolean() field.data = field.convert(None) assert not field.data assert not field.validate() assert field.errors == ["Required."]
def test_none(self): field = Boolean(required=False) field.data = field.convert(None) assert not field.data assert field.validate() assert field.errors == []
def test_none_default(self): field = Boolean(default=False) field.data = field.convert(None) assert not field.data assert field.validate() assert field.errors == []
def test_basic(self): field = Boolean() field.data = field.convert(["1"]) assert field.data assert field.errors == []