@@ -1035,8 +1035,11 @@ def test__extract_headers_from_download_gzipped(self):
10351035 "Content-Language" : "ko-kr" ,
10361036 "Cache-Control" : "max-age=1337;public" ,
10371037 "Content-Encoding" : "gzip" ,
1038+ "Etag" : "kittens" ,
10381039 "X-Goog-Storage-Class" : "STANDARD" ,
10391040 "X-Goog-Hash" : "crc32c=4gcgLQ==,md5=CS9tHYTtyFntzj7B9nkkJQ==" ,
1041+ "X-goog-generation" : 42 ,
1042+ "X-goog-metageneration" : 4 ,
10401043 },
10411044 # { "x": 5 } gzipped
10421045 content = b"\x1f \x8b \x08 \x00 \xcf o\x17 _\x02 \xff \xab VP\xaa P\xb2 R0U\xa8 \x05 \x00 \xa1 \xca Q\x93 \n \x00 \x00 \x00 " ,
@@ -1050,6 +1053,9 @@ def test__extract_headers_from_download_gzipped(self):
10501053 self .assertEqual (blob .storage_class , "STANDARD" )
10511054 self .assertEqual (blob .md5_hash , "CS9tHYTtyFntzj7B9nkkJQ==" )
10521055 self .assertEqual (blob .crc32c , "4gcgLQ==" )
1056+ self .assertEqual (blob .etag , "kittens" )
1057+ self .assertEqual (blob .generation , 42 )
1058+ self .assertEqual (blob .metageneration , 4 )
10531059
10541060 def test__extract_headers_from_download_empty (self ):
10551061 blob_name = "blob-name"
@@ -1064,8 +1070,11 @@ def test__extract_headers_from_download_empty(self):
10641070 "Content-Language" : "en-US" ,
10651071 "Cache-Control" : "max-age=1337;public" ,
10661072 "Content-Encoding" : "gzip" ,
1073+ "Etag" : "kittens" ,
10671074 "X-Goog-Storage-Class" : "STANDARD" ,
10681075 "X-Goog-Hash" : "crc32c=4/c+LQ==,md5=CS9tHYTt/+ntzj7B9nkkJQ==" ,
1076+ "X-goog-generation" : 42 ,
1077+ "X-goog-metageneration" : 4 ,
10691078 },
10701079 content = b"" ,
10711080 )
@@ -1074,6 +1083,9 @@ def test__extract_headers_from_download_empty(self):
10741083 self .assertEqual (blob .content_language , "en-US" )
10751084 self .assertEqual (blob .md5_hash , "CS9tHYTt/+ntzj7B9nkkJQ==" )
10761085 self .assertEqual (blob .crc32c , "4/c+LQ==" )
1086+ self .assertEqual (blob .etag , "kittens" )
1087+ self .assertEqual (blob .generation , 42 )
1088+ self .assertEqual (blob .metageneration , 4 )
10771089
10781090 def test__extract_headers_from_download_w_hash_response_header_none (self ):
10791091 blob_name = "blob-name"
0 commit comments