#NEWLINE# def test_create_get_delete_tag( self ) : #NEWLINE# #INDENT# tag_key = data_utils . rand_name ( 'tag-key' ) #NEWLINE# self . client . create_tags ( Resources = [ self . volume_id ] , Tags = [ { #NEWLINE# #INDENT# 'Key' : tag_key , #NEWLINE# 'Value' : 'fake_value' , #NEWLINE# #UNINDENT# } ] ) #NEWLINE# self . addResourceCleanUp ( self . client . delete_tags , Resources = [ self . volume_id ] , Tags = [ { #NEWLINE# #INDENT# 'Key' : tag_key , #NEWLINE# #UNINDENT# } ] ) #NEWLINE# data = self . client . describe_tags ( Filters = [ { #NEWLINE# #INDENT# 'Name' : 'resource-id' , #NEWLINE# 'Values' : [ self . volume_id ] , #NEWLINE# #UNINDENT# } ] ) #NEWLINE# self . assertEqual ( 1 , len ( data [ 'Tags' ] ) ) #NEWLINE# self . client . delete_tags ( Resources = [ self . volume_id ] , Tags = [ { #NEWLINE# #INDENT# 'Key' : tag_key , #NEWLINE# #UNINDENT# } ] ) #NEWLINE# data = self . client . describe_tags ( Filters = [ { #NEWLINE# #INDENT# 'Name' : 'resource-id' , #NEWLINE# 'Values' : [ self . volume_id ] , #NEWLINE# #UNINDENT# } ] ) #NEWLINE# self . assertEqual ( 0 , len ( data [ 'Tags' ] ) )