Updated tests
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import with_statement
|
||||
import sys
|
||||
sys.path[0:0] = [""]
|
||||
import unittest
|
||||
|
||||
from mongoengine import *
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import unittest
|
||||
import sys
|
||||
|
||||
sys.path[0:0] = [""]
|
||||
|
||||
from mongoengine import *
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
from __future__ import with_statement
|
||||
import unittest
|
||||
import sys
|
||||
|
||||
sys.path[0:0] = [""]
|
||||
|
||||
import os
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import sys
|
||||
sys.path[0:0] = [""]
|
||||
import unittest
|
||||
import warnings
|
||||
|
||||
|
||||
@@ -121,7 +121,7 @@ class ValidatorErrorTest(unittest.TestCase):
|
||||
except ValidationError, e:
|
||||
self.assertTrue("SubDoc:None" in e.message)
|
||||
self.assertEqual(e.to_dict(), {
|
||||
'e.val': 'Field is required'})
|
||||
"e": {'val': 'OK could not be converted to int'}})
|
||||
|
||||
Doc.drop_collection()
|
||||
|
||||
@@ -139,7 +139,7 @@ class ValidatorErrorTest(unittest.TestCase):
|
||||
except ValidationError, e:
|
||||
self.assertTrue("Doc:test" in e.message)
|
||||
self.assertEqual(e.to_dict(), {
|
||||
'e.val': 'Field is required'})
|
||||
"e": {'val': 'OK could not be converted to int'}})
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
Reference in New Issue
Block a user