#NEWLINE# def test_transaction_add_feed_tags( self ) : #NEWLINE# #INDENT# ca = ClientAuthMethod ( username , password ) #NEWLINE# reader = GoogleReader ( ca ) #NEWLINE# container = SpecialFeed ( reader , ReaderUrl . READING_LIST ) #NEWLINE# container . loadItems ( ) #NEWLINE# tags = [ ( 'test-transaction%s' % x ) for x in range ( 5 ) ] #NEWLINE# feed_1 = container . items [ 0 ] #NEWLINE# reader . beginAddItemTagTransaction ( ) #NEWLINE# for tag in tags : #NEWLINE# #INDENT# reader . addItemTag ( feed_1 , ( 'user/-/label/' + tag ) ) #NEWLINE# #UNINDENT# reader . commitAddItemTagTransaction ( ) #NEWLINE# container . clearItems ( ) #NEWLINE# container . loadItems ( ) #NEWLINE# feed_2 = container . items [ 0 ] #NEWLINE# tags_exist = [ any ( map ( ( lambda tag : ( tag in x ) ) , tags ) ) for x in feed_2 . data [ 'categories' ] ] #NEWLINE# tag_exist_count = sum ( [ 1 for x in tags_exist if x ] ) #NEWLINE# self . assertEqual ( 5 , tag_exist_count )