Added test for listfield fix
Added Pau Aliagas to authors [closes #299]
This commit is contained in:
parent
9b4d0f6450
commit
60b6ad3fcf
1
AUTHORS
1
AUTHORS
@ -68,3 +68,4 @@ that much better:
|
|||||||
* Albert Choi
|
* Albert Choi
|
||||||
* John Arnfield
|
* John Arnfield
|
||||||
* grubberr
|
* grubberr
|
||||||
|
* Paul Aliagas
|
||||||
|
@ -5,6 +5,7 @@ Changelog
|
|||||||
Changes in dev
|
Changes in dev
|
||||||
==============
|
==============
|
||||||
|
|
||||||
|
- Fixed ListField so it doesnt accept strings
|
||||||
- Added DynamicDocument and EmbeddedDynamicDocument classes for expando schemas
|
- Added DynamicDocument and EmbeddedDynamicDocument classes for expando schemas
|
||||||
|
|
||||||
Changes in v0.5
|
Changes in v0.5
|
||||||
|
@ -515,6 +515,20 @@ class FieldTest(unittest.TestCase):
|
|||||||
|
|
||||||
Simple.drop_collection()
|
Simple.drop_collection()
|
||||||
|
|
||||||
|
|
||||||
|
def test_list_field_rejects_strings(self):
|
||||||
|
"""Strings aren't valid list field data types"""
|
||||||
|
|
||||||
|
class Simple(Document):
|
||||||
|
mapping = ListField()
|
||||||
|
|
||||||
|
Simple.drop_collection()
|
||||||
|
e = Simple()
|
||||||
|
e.mapping = 'hello world'
|
||||||
|
|
||||||
|
self.assertRaises(ValidationError, e.save)
|
||||||
|
|
||||||
|
|
||||||
def test_list_field_complex(self):
|
def test_list_field_complex(self):
|
||||||
"""Ensure that the list fields can handle the complex types."""
|
"""Ensure that the list fields can handle the complex types."""
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user