Fix IntField assignment unit tests
This commit is contained in:
parent
069aedabc1
commit
2a93a69085
3 changed files with 6 additions and 13 deletions
|
|
@ -134,13 +134,8 @@ class ValidatorErrorTest(unittest.TestCase):
|
|||
self.assertTrue('e' in keys)
|
||||
self.assertTrue('id' in keys)
|
||||
|
||||
doc.e.val = "OK"
|
||||
try:
|
||||
doc.save()
|
||||
except ValidationError, e:
|
||||
self.assertTrue("Doc:test" in e.message)
|
||||
self.assertEqual(e.to_dict(), {
|
||||
"e": {'val': 'OK could not be converted to int'}})
|
||||
with self.assertRaises(ValueError):
|
||||
doc.e.val = "OK"
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue