'Ensure connect() works when specifying a replicaSet via the
MongoDB URI.'

def test_connect_with_replicaset_via_uri(self):

    if IS_PYMONGO_3:
        c = connect(host='mongodb://localhost/test?replicaSet=local-rs')
        db = get_db()
        self.assertTrue(isinstance(db, pymongo.database.Database))
        self.assertEqual(db.name, 'test')
    else:
        with self.assertRaises(MongoEngineConnectionError):
            c = connect(host='mongodb://localhost/test?replicaSet=local-rs')
