@@ -279,21 +279,21 @@ def test_commit_w_auto_id_entities(self):
279279 self .assertEqual (key ._id , _NEW_ID )
280280
281281 def test_as_context_mgr_wo_error (self ):
282- from gcloud .datastore .batch import _BATCHES
282+ from gcloud .datastore .connection import _CONNECTIONS
283283 _DATASET = 'DATASET'
284284 _PROPERTIES = {'foo' : 'bar' }
285285 connection = _Connection ()
286286 entity = _Entity (_PROPERTIES )
287287 key = entity .key = _Key (_DATASET )
288288
289- self .assertEqual (list (_BATCHES ), [])
289+ self .assertEqual (list (_CONNECTIONS ), [])
290290
291291 with self ._makeOne (dataset_id = _DATASET ,
292292 connection = connection ) as batch :
293- self .assertEqual (list (_BATCHES ), [batch ])
293+ self .assertEqual (list (_CONNECTIONS ), [batch ])
294294 batch .put (entity )
295295
296- self .assertEqual (list (_BATCHES ), [])
296+ self .assertEqual (list (_CONNECTIONS ), [])
297297
298298 insert_auto_ids = list (batch .mutation .insert_auto_id )
299299 self .assertEqual (len (insert_auto_ids ), 0 )
@@ -305,7 +305,7 @@ def test_as_context_mgr_wo_error(self):
305305 self .assertEqual (connection ._committed , [(_DATASET , batch .mutation )])
306306
307307 def test_as_context_mgr_nested (self ):
308- from gcloud .datastore .batch import _BATCHES
308+ from gcloud .datastore .connection import _CONNECTIONS
309309 _DATASET = 'DATASET'
310310 _PROPERTIES = {'foo' : 'bar' }
311311 connection = _Connection ()
@@ -314,20 +314,20 @@ def test_as_context_mgr_nested(self):
314314 entity2 = _Entity (_PROPERTIES )
315315 key2 = entity2 .key = _Key (_DATASET )
316316
317- self .assertEqual (list (_BATCHES ), [])
317+ self .assertEqual (list (_CONNECTIONS ), [])
318318
319319 with self ._makeOne (dataset_id = _DATASET ,
320320 connection = connection ) as batch1 :
321- self .assertEqual (list (_BATCHES ), [batch1 ])
321+ self .assertEqual (list (_CONNECTIONS ), [batch1 ])
322322 batch1 .put (entity1 )
323323 with self ._makeOne (dataset_id = _DATASET ,
324324 connection = connection ) as batch2 :
325- self .assertEqual (list (_BATCHES ), [batch2 , batch1 ])
325+ self .assertEqual (list (_CONNECTIONS ), [batch2 , batch1 ])
326326 batch2 .put (entity2 )
327327
328- self .assertEqual (list (_BATCHES ), [batch1 ])
328+ self .assertEqual (list (_CONNECTIONS ), [batch1 ])
329329
330- self .assertEqual (list (_BATCHES ), [])
330+ self .assertEqual (list (_CONNECTIONS ), [])
331331
332332 insert_auto_ids = list (batch1 .mutation .insert_auto_id )
333333 self .assertEqual (len (insert_auto_ids ), 0 )
@@ -350,25 +350,25 @@ def test_as_context_mgr_nested(self):
350350 (_DATASET , batch1 .mutation )])
351351
352352 def test_as_context_mgr_w_error (self ):
353- from gcloud .datastore .batch import _BATCHES
353+ from gcloud .datastore .connection import _CONNECTIONS
354354 _DATASET = 'DATASET'
355355 _PROPERTIES = {'foo' : 'bar' }
356356 connection = _Connection ()
357357 entity = _Entity (_PROPERTIES )
358358 key = entity .key = _Key (_DATASET )
359359
360- self .assertEqual (list (_BATCHES ), [])
360+ self .assertEqual (list (_CONNECTIONS ), [])
361361
362362 try :
363363 with self ._makeOne (dataset_id = _DATASET ,
364364 connection = connection ) as batch :
365- self .assertEqual (list (_BATCHES ), [batch ])
365+ self .assertEqual (list (_CONNECTIONS ), [batch ])
366366 batch .put (entity )
367367 raise ValueError ("testing" )
368368 except ValueError :
369369 pass
370370
371- self .assertEqual (list (_BATCHES ), [])
371+ self .assertEqual (list (_CONNECTIONS ), [])
372372
373373 insert_auto_ids = list (batch .mutation .insert_auto_id )
374374 self .assertEqual (len (insert_auto_ids ), 0 )
0 commit comments