fix style
This commit is contained in:
parent
fd02d77c59
commit
f605eb14e8
@ -1,7 +1,7 @@
|
|||||||
from mongoengine.common import _import_class
|
from mongoengine.common import _import_class
|
||||||
from mongoengine.connection import DEFAULT_CONNECTION_NAME, get_db
|
|
||||||
from pymongo.write_concern import WriteConcern
|
|
||||||
from contextlib import contextmanager
|
from contextlib import contextmanager
|
||||||
|
from pymongo.write_concern import WriteConcern
|
||||||
|
from mongoengine.connection import DEFAULT_CONNECTION_NAME, get_db
|
||||||
|
|
||||||
|
|
||||||
__all__ = ('switch_db', 'switch_collection', 'no_dereference',
|
__all__ = ('switch_db', 'switch_collection', 'no_dereference',
|
||||||
|
@ -854,7 +854,7 @@ class Document(BaseDocument):
|
|||||||
collection = cls._get_collection()
|
collection = cls._get_collection()
|
||||||
# 746: when connection is via mongos, the read preference is not necessarily an indication that
|
# 746: when connection is via mongos, the read preference is not necessarily an indication that
|
||||||
# this code runs on a secondary
|
# this code runs on a secondary
|
||||||
if not collection.database.client.is_mongos and collection.read_preference > 1:
|
if not collection.is_mongos and collection.read_preference > 1:
|
||||||
return
|
return
|
||||||
|
|
||||||
# determine if an index which we are creating includes
|
# determine if an index which we are creating includes
|
||||||
|
4
tox.ini
4
tox.ini
@ -1,13 +1,11 @@
|
|||||||
[tox]
|
[tox]
|
||||||
envlist = {py27,py35,pypy,pypy3}-{mg27,mg28,mg35,mg3x}
|
envlist = {py27,py35,pypy,pypy3}-{mg35,mg3x}
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
commands =
|
commands =
|
||||||
python setup.py nosetests {posargs}
|
python setup.py nosetests {posargs}
|
||||||
deps =
|
deps =
|
||||||
nose
|
nose
|
||||||
mg27: PyMongo<2.8
|
|
||||||
mg28: PyMongo>=2.8,<2.9
|
|
||||||
mg35: PyMongo==3.5
|
mg35: PyMongo==3.5
|
||||||
mg3x: PyMongo>=3.0
|
mg3x: PyMongo>=3.0
|
||||||
setenv =
|
setenv =
|
||||||
|
Loading…
x
Reference in New Issue
Block a user