fix validation for a nested DictField

This commit is contained in:
Stefan Wojcik
2013-09-16 23:50:13 -07:00
parent bcbe740598
commit 89785da1c5
2 changed files with 23 additions and 2 deletions

View File

@@ -1109,9 +1109,15 @@ class FieldTest(unittest.TestCase):
post.info = {'$title': 'test'}
self.assertRaises(ValidationError, post.validate)
post.info = {'nested': {'$title': 'test'}}
self.assertRaises(ValidationError, post.validate)
post.info = {'the.title': 'test'}
self.assertRaises(ValidationError, post.validate)
post.info = {'nested': {'the.title': 'test'}}
self.assertRaises(ValidationError, post.validate)
post.info = {1: 'test'}
self.assertRaises(ValidationError, post.validate)