Merge branch 'dev' of https://github.com/alefnula/mongoengine into alefnula-dev

This commit is contained in:
Harry Marr
2011-01-09 21:00:03 +00:00
4 changed files with 25 additions and 8 deletions

View File

@@ -644,7 +644,8 @@ class FieldTest(unittest.TestCase):
"""Ensure that value is in a container of allowed values.
"""
class Shirt(Document):
size = StringField(max_length=3, choices=('S','M','L','XL','XXL'))
size = StringField(max_length=3, choices=(('S', 'Small'), ('M', 'Medium'), ('L', 'Large'),
('XL', 'Extra Large'), ('XXL', 'Extra Extra Large')))
Shirt.drop_collection()