run tests only pymongo3 #1565

This commit is contained in:
Erdenezul Batmunkh 2017-10-02 23:15:37 +08:00
parent 416486c370
commit 5c4ce8754e

View File

@ -365,6 +365,7 @@ class ConnectionTest(unittest.TestCase):
self.assertEqual(d, date_doc.the_date)
def test_read_preference_from_parse(self):
if IS_PYMONGO_3:
from pymongo import ReadPreference
conn = connect(host="mongodb://a1.vpc,a2.vpc,a3.vpc/prod?readPreference=secondaryPreferred")
self.assertEqual(conn.read_preference, ReadPreference.SECONDARY_PREFERRED)