Python mongoengine.BooleanField() Examples
The following are 2
code examples of mongoengine.BooleanField().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
mongoengine
, or try the search function
.
Example #1
Source File: test_params.py From marshmallow-mongoengine with MIT License | 5 votes |
def test_required_with_default(self): class Doc(me.Document): basic = me.IntField(required=True, default=42) cunning = me.BooleanField(required=True, default=False) class DocSchema(ModelSchema): class Meta: model = Doc doc, errors = DocSchema().load({}) assert not errors assert doc.basic == 42 assert doc.cunning is False
Example #2
Source File: test_converter.py From graphene-mongo with MIT License | 5 votes |
def test_should_boolean_convert_boolean(): assert_conversion(mongoengine.BooleanField, graphene.Boolean)