36
36
class StorageBlobTagsTest (StorageTestCase ):
37
37
38
38
def _setup (self , storage_account_name , key ):
39
- self .bsc = self . create_storage_client ( BlobServiceClient , self .account_url (storage_account_name , "blob" ), credential = key )
39
+ self .bsc = BlobServiceClient ( self .account_url (storage_account_name , "blob" ), credential = key )
40
40
self .container_name = self .get_resource_name ("container" )
41
41
if self .is_live :
42
42
container = self .bsc .get_container_client (self .container_name )
@@ -92,7 +92,6 @@ def _create_container(self, prefix="container"):
92
92
93
93
#-- test cases for blob tags ----------------------------------------------
94
94
95
- @pytest .mark .skipif (is_version_before (ServiceVersion .V2019_12_12 ), reason = "SV too low" )
96
95
@BlobPreparer ()
97
96
def test_set_blob_tags (self , storage_account_name , storage_account_key ):
98
97
self ._setup (storage_account_name , storage_account_key )
@@ -105,7 +104,6 @@ def test_set_blob_tags(self, storage_account_name, storage_account_key):
105
104
# Assert
106
105
self .assertIsNotNone (resp )
107
106
108
- @pytest .mark .skipif (is_version_before (ServiceVersion .V2019_12_12 ), reason = "SV too low" )
109
107
@BlobPreparer ()
110
108
def test_set_blob_tags_with_lease (self , storage_account_name , storage_account_key ):
111
109
self ._setup (storage_account_name , storage_account_key )
@@ -128,7 +126,7 @@ def test_set_blob_tags_with_lease(self, storage_account_name, storage_account_ke
128
126
129
127
blob_client .delete_blob (lease = lease )
130
128
131
- @pytest .mark .skipif ( is_version_before ( ServiceVersion . V2019_12_12 ), reason = "SV too low" )
129
+ @pytest .mark .live_test_only
132
130
@BlobPreparer ()
133
131
def test_set_blob_tags_for_a_version (self , versioned_storage_account_name , versioned_storage_account_key ):
134
132
self ._setup (versioned_storage_account_name , versioned_storage_account_key )
@@ -144,7 +142,6 @@ def test_set_blob_tags_for_a_version(self, versioned_storage_account_name, versi
144
142
# Assert
145
143
self .assertIsNotNone (resp )
146
144
147
- @pytest .mark .skipif (is_version_before (ServiceVersion .V2019_12_12 ), reason = "SV too low" )
148
145
@BlobPreparer ()
149
146
def test_get_blob_tags (self , storage_account_name , storage_account_key ):
150
147
self ._setup (storage_account_name , storage_account_key )
@@ -162,7 +159,6 @@ def test_get_blob_tags(self, storage_account_name, storage_account_key):
162
159
for key , value in resp .items ():
163
160
self .assertEqual (tags [key ], value )
164
161
165
- @pytest .mark .skipif (is_version_before (ServiceVersion .V2019_12_12 ), reason = "SV too low" )
166
162
@BlobPreparer ()
167
163
def test_get_blob_tags_for_a_snapshot (self , storage_account_name , storage_account_key ):
168
164
self ._setup (storage_account_name , storage_account_key )
@@ -180,7 +176,6 @@ def test_get_blob_tags_for_a_snapshot(self, storage_account_name, storage_accoun
180
176
for key , value in resp .items ():
181
177
self .assertEqual (tags [key ], value )
182
178
183
- @pytest .mark .skipif (is_version_before (ServiceVersion .V2019_12_12 ), reason = "SV too low" )
184
179
@BlobPreparer ()
185
180
def test_upload_block_blob_with_tags (self , storage_account_name , storage_account_key ):
186
181
self ._setup (storage_account_name , storage_account_key )
@@ -193,7 +188,6 @@ def test_upload_block_blob_with_tags(self, storage_account_name, storage_account
193
188
self .assertIsNotNone (resp )
194
189
self .assertEqual (len (resp ), 3 )
195
190
196
- @pytest .mark .skipif (is_version_before (ServiceVersion .V2019_12_12 ), reason = "SV too low" )
197
191
@BlobPreparer ()
198
192
def test_get_blob_properties_returns_tags_num (self , storage_account_name , storage_account_key ):
199
193
self ._setup (storage_account_name , storage_account_key )
@@ -208,7 +202,6 @@ def test_get_blob_properties_returns_tags_num(self, storage_account_name, storag
208
202
self .assertEqual (resp .tag_count , len (tags ))
209
203
self .assertEqual (downloaded .properties .tag_count , len (tags ))
210
204
211
- @pytest .mark .skipif (is_version_before (ServiceVersion .V2019_12_12 ), reason = "SV too low" )
212
205
@BlobPreparer ()
213
206
def test_create_append_blob_with_tags (self , storage_account_name , storage_account_key ):
214
207
self ._setup (storage_account_name , storage_account_key )
@@ -221,7 +214,6 @@ def test_create_append_blob_with_tags(self, storage_account_name, storage_accoun
221
214
self .assertIsNotNone (resp )
222
215
self .assertEqual (len (resp ), 3 )
223
216
224
- @pytest .mark .skipif (is_version_before (ServiceVersion .V2019_12_12 ), reason = "SV too low" )
225
217
@BlobPreparer ()
226
218
def test_create_page_blob_with_tags (self , storage_account_name , storage_account_key ):
227
219
self ._setup (storage_account_name , storage_account_key )
@@ -234,7 +226,6 @@ def test_create_page_blob_with_tags(self, storage_account_name, storage_account_
234
226
self .assertIsNotNone (resp )
235
227
self .assertEqual (len (resp ), 3 )
236
228
237
- @pytest .mark .skipif (is_version_before (ServiceVersion .V2019_12_12 ), reason = "SV too low" )
238
229
@BlobPreparer ()
239
230
def test_commit_block_list_with_tags (self , storage_account_name , storage_account_key ):
240
231
self ._setup (storage_account_name , storage_account_key )
@@ -257,7 +248,6 @@ def test_commit_block_list_with_tags(self, storage_account_name, storage_account
257
248
self .assertIsNotNone (resp )
258
249
self .assertEqual (len (resp ), len (tags ))
259
250
260
- @pytest .mark .skipif (is_version_before (ServiceVersion .V2019_12_12 ), reason = "SV too low" )
261
251
@BlobPreparer ()
262
252
def test_start_copy_from_url_with_tags (self , storage_account_name , storage_account_key ):
263
253
self ._setup (storage_account_name , storage_account_key )
@@ -286,7 +276,6 @@ def test_start_copy_from_url_with_tags(self, storage_account_name, storage_accou
286
276
self .assertIsNotNone (resp )
287
277
self .assertEqual (len (resp ), len (tags ))
288
278
289
- @pytest .mark .skipif (is_version_before (ServiceVersion .V2019_12_12 ), reason = "SV too low" )
290
279
@BlobPreparer ()
291
280
def test_list_blobs_returns_tags (self , storage_account_name , storage_account_key ):
292
281
self ._setup (storage_account_name , storage_account_key )
@@ -301,7 +290,6 @@ def test_list_blobs_returns_tags(self, storage_account_name, storage_account_key
301
290
for key , value in blob .tags .items ():
302
291
self .assertEqual (tags [key ], value )
303
292
304
- @pytest .mark .skipif (is_version_before (ServiceVersion .V2019_12_12 ), reason = "SV too low" )
305
293
@BlobPreparer ()
306
294
def test_filter_blobs (self , storage_account_name , storage_account_key ):
307
295
self ._setup (storage_account_name , storage_account_key )
@@ -330,7 +318,7 @@ def test_filter_blobs(self, storage_account_name, storage_account_key):
330
318
self .assertEqual (items_on_page2 [0 ]['tags' ]['tag1' ], 'firsttag' )
331
319
self .assertEqual (items_on_page2 [0 ]['tags' ]['tag2' ], 'secondtag' )
332
320
333
- @pytest .mark .skipif ( is_version_before ( ServiceVersion . V2019_12_12 ), reason = "SV too low " )
321
+ @pytest .mark .skip ( reason = "https://github.com/Azure/azure-sdk-for-python/issues/23693 ; Test failing after resolving odd service versioning skip behavior. " )
334
322
@pytest .mark .live_test_only
335
323
@BlobPreparer ()
336
324
def test_filter_blobs_using_account_sas (self , storage_account_name , storage_account_key ):
@@ -362,7 +350,7 @@ def test_filter_blobs_using_account_sas(self, storage_account_name, storage_acco
362
350
items_on_page1 = list (first_page )
363
351
self .assertEqual (1 , len (items_on_page1 ))
364
352
365
- @pytest .mark .skipif ( is_version_before ( ServiceVersion . V2019_12_12 ), reason = "SV too low " )
353
+ @pytest .mark .skip ( reason = "https://github.com/Azure/azure-sdk-for-python/issues/23693 ; Test failing after resolving odd service versioning skip behavior. " )
366
354
@pytest .mark .live_test_only
367
355
@BlobPreparer ()
368
356
def test_set_blob_tags_using_blob_sas (self , storage_account_name , storage_account_key ):
0 commit comments