Use six integer types instead of explicit types, since six is now a dependency of the project.
This commit is contained in:
parent
39eec59c90
commit
d9b3a9fb60
@ -20,7 +20,6 @@ else:
|
|||||||
import pymongo
|
import pymongo
|
||||||
import gridfs
|
import gridfs
|
||||||
from bson import Binary, DBRef, SON, ObjectId
|
from bson import Binary, DBRef, SON, ObjectId
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from bson.int64 import Int64
|
from bson.int64 import Int64
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
@ -12,6 +12,7 @@ import uuid
|
|||||||
import math
|
import math
|
||||||
import itertools
|
import itertools
|
||||||
import re
|
import re
|
||||||
|
import six
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import dateutil
|
import dateutil
|
||||||
@ -3620,7 +3621,7 @@ class FieldTest(unittest.TestCase):
|
|||||||
doc = TestLongFieldConsideredAsInt64(some_long=42).save()
|
doc = TestLongFieldConsideredAsInt64(some_long=42).save()
|
||||||
db = get_db()
|
db = get_db()
|
||||||
self.assertTrue(isinstance(db.test_long_field_considered_as_int64.find()[0]['some_long'], Int64))
|
self.assertTrue(isinstance(db.test_long_field_considered_as_int64.find()[0]['some_long'], Int64))
|
||||||
self.assertTrue(isinstance(doc.some_long, (int, long,)))
|
self.assertTrue(isinstance(doc.some_long, six.integer_types))
|
||||||
|
|
||||||
|
|
||||||
class EmbeddedDocumentListFieldTestCase(unittest.TestCase):
|
class EmbeddedDocumentListFieldTestCase(unittest.TestCase):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user