Choice field test updated
This commit is contained in:
parent
e1282028a5
commit
9c8411b251
1
.gitignore
vendored
1
.gitignore
vendored
@ -7,5 +7,6 @@ build/
|
|||||||
dist/
|
dist/
|
||||||
mongoengine.egg-info/
|
mongoengine.egg-info/
|
||||||
env/
|
env/
|
||||||
|
.settings
|
||||||
.project
|
.project
|
||||||
.pydevproject
|
.pydevproject
|
@ -644,7 +644,8 @@ class FieldTest(unittest.TestCase):
|
|||||||
"""Ensure that value is in a container of allowed values.
|
"""Ensure that value is in a container of allowed values.
|
||||||
"""
|
"""
|
||||||
class Shirt(Document):
|
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()
|
Shirt.drop_collection()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user