BREAKING CHANGE rename ConnectionError to MongoEngineConnectionError to avoid conflicts with PY3's built-in ConnectionError

This commit is contained in:
Stefan Wojcik
2016-12-08 15:18:17 -05:00
parent c86155e571
commit b02904ee75
3 changed files with 19 additions and 13 deletions

View File

@@ -15,7 +15,7 @@ else:
import mongoengine
from mongoengine import *
from mongoengine.connection import ConnectionError
from mongoengine.connection import MongoEngineConnectionError
class ConnectionTest(unittest.TestCase):
@@ -38,7 +38,7 @@ class ConnectionTest(unittest.TestCase):
conn = connect(db='mongoenginetest',
host="mongodb://localhost/mongoenginetest?replicaSet=rs",
read_preference=READ_PREF)
except ConnectionError as e:
except MongoEngineConnectionError as e:
return
if not isinstance(conn, CONN_CLASS):