<s> from tests . unit import AWSMockServiceTestCase <EOL> from boto . s3 . connection import S3Connection <EOL> from boto . s3 . bucket import Bucket <EOL> from boto . s3 . tagging import Tag <EOL> class TestS3Tagging ( AWSMockServiceTestCase ) : <EOL> connection_class = S3Connection <EOL> def default_body ( self ) : <EOL> return """<STR_LIT>""" <EOL> def test_parse_tagging_response ( self ) : <EOL> self . set_http_response ( status_code = <NUM_LIT:200> ) <EOL> b = Bucket ( self . service_connection , '<STR_LIT>' ) <EOL> api_response = b . get_tags ( ) <EOL> self . assertEqual ( len ( api_response ) , <NUM_LIT:1> ) <EOL> self . assertEqual ( len ( api_response [ <NUM_LIT:0> ] ) , <NUM_LIT:2> ) <EOL> self . assertEqual ( api_response [ <NUM_LIT:0> ] [ <NUM_LIT:0> ] . key , '<STR_LIT>' ) <EOL> self . assertEqual ( api_response [ <NUM_LIT:0> ] [ <NUM_LIT:0> ] . value , '<STR_LIT>' ) <EOL> self . assertEqual ( api_response [ <NUM_LIT:0> ] [ <NUM_LIT:1> ] . key , '<STR_LIT>' ) <EOL> self . assertEqual ( api_response [ <NUM_LIT:0> ] [ <NUM_LIT:1> ] . value , '<STR_LIT>' ) <EOL> def test_tag_equality ( self ) : <EOL> t1 = Tag ( '<STR_LIT:foo>' , '<STR_LIT:bar>' ) <EOL> t2 = Tag ( '<STR_LIT:foo>' , '<STR_LIT:bar>' ) <EOL> t3 = Tag ( '<STR_LIT:foo>' , '<STR_LIT>' ) <EOL> t4 = Tag ( '<STR_LIT>' , '<STR_LIT:bar>' ) <EOL> self . assertEqual ( t1 , t2 ) <EOL> self . assertNotEqual ( t1 , t3 ) <EOL> self . assertNotEqual ( t1 , t4 ) </s>
