@@ -33,7 +33,7 @@ def test_set_tags(self, click):
3333 click .secho .assert_called_with ('Set tags successfully' , fg = 'green' )
3434 self .assert_no_fail (result )
3535 self .assert_called_with ('SoftLayer_Tag' , 'setTags' ,
36- args = ("tag1,tag2" , "GUEST" , 100 ),)
36+ args = ("tag1,tag2" , "GUEST" , 100 ), )
3737
3838 @mock .patch ('SoftLayer.CLI.tags.set.click' )
3939 def test_set_tags_failure (self , click ):
@@ -43,4 +43,16 @@ def test_set_tags_failure(self, click):
4343 click .secho .assert_called_with ('Failed to set tags' , fg = 'red' )
4444 self .assert_no_fail (result )
4545 self .assert_called_with ('SoftLayer_Tag' , 'setTags' ,
46- args = ("tag1,tag2" , "GUEST" , 100 ),)
46+ args = ("tag1,tag2" , "GUEST" , 100 ), )
47+
48+ def test_details_by_name (self ):
49+ tag_name = 'bs_test_instance'
50+ result = self .run_command (['tags' , 'details' , tag_name ])
51+ self .assert_no_fail (result )
52+ self .assert_called_with ('SoftLayer_Tag' , 'getTagByTagName' , args = (tag_name ,))
53+
54+ def test_details_by_id (self ):
55+ tag_id = '1286571'
56+ result = self .run_command (['tags' , 'details' , tag_id ])
57+ self .assert_no_fail (result )
58+ self .assert_called_with ('SoftLayer_Tag' , 'getObject' , identifier = tag_id )
0 commit comments