'Ensure that value is in a container of allowed values.'

def test_simple_choices_validation(self):

    class Shirt(Document, ):
        size = StringField(max_length=3, choices=('S', 'M', 'L', 'XL', 'XXL'))
    Shirt.drop_collection()
    shirt = Shirt()
    shirt.validate()
    shirt.size = 'S'
    shirt.validate()
    shirt.size = 'XS'
    self.assertRaises(ValidationError, shirt.validate)
