@@ -783,8 +783,7 @@ def test_exists_w_generation_match(self):
783783
784784 def test_delete_wo_generation (self ):
785785 BLOB_NAME = "blob-name"
786- not_found_response = ({"status" : http_client .NOT_FOUND }, b"" )
787- connection = _Connection (not_found_response )
786+ connection = _Connection () # no requests will be made
788787 client = _Client (connection )
789788 bucket = _Bucket (client )
790789 blob = self ._make_one (BLOB_NAME , bucket = bucket )
@@ -812,8 +811,7 @@ def test_delete_wo_generation(self):
812811 def test_delete_w_generation (self ):
813812 BLOB_NAME = "blob-name"
814813 GENERATION = 123456
815- not_found_response = ({"status" : http_client .NOT_FOUND }, b"" )
816- connection = _Connection (not_found_response )
814+ connection = _Connection () # no requests will be made
817815 client = _Client (connection )
818816 bucket = _Bucket (client )
819817 blob = self ._make_one (BLOB_NAME , bucket = bucket , generation = GENERATION )
@@ -841,8 +839,7 @@ def test_delete_w_generation(self):
841839 def test_delete_w_generation_match (self ):
842840 BLOB_NAME = "blob-name"
843841 GENERATION = 123456
844- not_found_response = ({"status" : http_client .NOT_FOUND }, b"" )
845- connection = _Connection (not_found_response )
842+ connection = _Connection () # no requests will be made
846843 client = _Client (connection )
847844 bucket = _Bucket (client )
848845 blob = self ._make_one (BLOB_NAME , bucket = bucket , generation = GENERATION )
@@ -4887,11 +4884,7 @@ def _respond(self, **kw):
48874884 return response
48884885
48894886 def api_request (self , ** kw ):
4890- from google .cloud .exceptions import NotFound
4891-
48924887 info , content = self ._respond (** kw )
4893- if info .get ("status" ) == http_client .NOT_FOUND :
4894- raise NotFound (info )
48954888 return content
48964889
48974890
0 commit comments