'Ensure connect() works when specifying a replicaSet via the
connection kwargs'

def test_connect_with_replicaset_via_kwargs(self):

    if IS_PYMONGO_3:
        c = connect(replicaset='local-rs')
        self.assertEqual(c._MongoClient__options.replica_set_name, 'local-rs')
        db = get_db()
        self.assertTrue(isinstance(db, pymongo.database.Database))
        self.assertEqual(db.name, 'test')
    else:
        with self.assertRaises(MongoEngineConnectionError):
            c = connect(replicaset='local-rs')
