1414
1515import unittest
1616
17- from google .cloud .datastore .connection import _HAVE_GRPC
17+ from google .cloud .datastore ._http import _HAVE_GRPC
1818
1919
2020class Test_DatastoreAPIOverHttp (unittest .TestCase ):
2121
2222 def _getTargetClass (self ):
23- from google .cloud .datastore .connection import _DatastoreAPIOverHttp
23+ from google .cloud .datastore ._http import _DatastoreAPIOverHttp
2424 return _DatastoreAPIOverHttp
2525
2626 def _makeOne (self , * args , ** kw ):
@@ -110,7 +110,7 @@ def test__request_not_200(self):
110110class Test__grpc_catch_rendezvous (unittest .TestCase ):
111111
112112 def _callFUT (self ):
113- from google .cloud .datastore .connection import _grpc_catch_rendezvous
113+ from google .cloud .datastore ._http import _grpc_catch_rendezvous
114114 return _grpc_catch_rendezvous ()
115115
116116 @staticmethod
@@ -175,12 +175,12 @@ def test_commit_failure_non_grpc_err(self):
175175class Test_DatastoreAPIOverGRPC (unittest .TestCase ):
176176
177177 def _getTargetClass (self ):
178- from google .cloud .datastore .connection import _DatastoreAPIOverGRPC
178+ from google .cloud .datastore ._http import _DatastoreAPIOverGRPC
179179 return _DatastoreAPIOverGRPC
180180
181181 def _makeOne (self , stub , connection = None , secure = True , mock_args = None ):
182182 from google .cloud ._testing import _Monkey
183- from google .cloud .datastore import connection as MUT
183+ from google .cloud .datastore import _http as MUT
184184
185185 if connection is None :
186186 connection = _Connection (None )
@@ -202,7 +202,7 @@ def mock_make_stub(*args):
202202 return self ._getTargetClass ()(connection , secure )
203203
204204 def test_constructor (self ):
205- from google .cloud .datastore import connection as MUT
205+ from google .cloud .datastore import _http as MUT
206206
207207 conn = _Connection (None )
208208 conn .credentials = object ()
@@ -222,7 +222,7 @@ def test_constructor(self):
222222 )])
223223
224224 def test_constructor_insecure (self ):
225- from google .cloud .datastore import connection as MUT
225+ from google .cloud .datastore import _http as MUT
226226
227227 conn = _Connection (None )
228228 conn .credentials = object ()
@@ -351,7 +351,7 @@ def test_allocate_ids(self):
351351class TestConnection (unittest .TestCase ):
352352
353353 def _getTargetClass (self ):
354- from google .cloud .datastore .connection import Connection
354+ from google .cloud .datastore ._http import Connection
355355
356356 return Connection
357357
@@ -370,7 +370,7 @@ def _make_query_pb(self, kind):
370370
371371 def _makeOne (self , credentials = None , http = None , use_grpc = False ):
372372 from google .cloud ._testing import _Monkey
373- from google .cloud .datastore import connection as MUT
373+ from google .cloud .datastore import _http as MUT
374374 with _Monkey (MUT , _USE_GRPC = use_grpc ):
375375 return self ._getTargetClass ()(credentials = credentials , http = http )
376376
@@ -408,7 +408,7 @@ def test_ctor_defaults(self):
408408
409409 def test_ctor_without_grpc (self ):
410410 from google .cloud ._testing import _Monkey
411- from google .cloud .datastore import connection as MUT
411+ from google .cloud .datastore import _http as MUT
412412
413413 connections = []
414414 return_val = object ()
@@ -426,7 +426,7 @@ def mock_api(connection):
426426
427427 def test_ctor_with_grpc (self ):
428428 from google .cloud ._testing import _Monkey
429- from google .cloud .datastore import connection as MUT
429+ from google .cloud .datastore import _http as MUT
430430
431431 api_args = []
432432 return_val = object ()
@@ -921,7 +921,7 @@ def test_begin_transaction(self):
921921 def test_commit_wo_transaction (self ):
922922 from google .cloud ._testing import _Monkey
923923 from google .cloud .datastore ._generated import datastore_pb2
924- from google .cloud .datastore import connection as MUT
924+ from google .cloud .datastore import _http as MUT
925925 from google .cloud .datastore .helpers import _new_value_pb
926926
927927 PROJECT = 'PROJECT'
@@ -967,7 +967,7 @@ def mock_parse(response):
967967 def test_commit_w_transaction (self ):
968968 from google .cloud ._testing import _Monkey
969969 from google .cloud .datastore ._generated import datastore_pb2
970- from google .cloud .datastore import connection as MUT
970+ from google .cloud .datastore import _http as MUT
971971 from google .cloud .datastore .helpers import _new_value_pb
972972
973973 PROJECT = 'PROJECT'
@@ -1091,7 +1091,7 @@ def test_allocate_ids_non_empty(self):
10911091class Test__parse_commit_response (unittest .TestCase ):
10921092
10931093 def _callFUT (self , commit_response_pb ):
1094- from google .cloud .datastore .connection import _parse_commit_response
1094+ from google .cloud .datastore ._http import _parse_commit_response
10951095 return _parse_commit_response (commit_response_pb )
10961096
10971097 def test_it (self ):
0 commit comments