#NEWLINE# @ attr ( user = 'member' ) #NEWLINE# def test_6_POST_users_id_favorites( self ) : #NEWLINE# #INDENT# 'POST /users/<id>/favorites.json (member)\n        \n        Tests the endpoint for creating a new favorite for a user.\n        ' #NEWLINE# self . assert_ ( ( len ( self . testdata [ 'assets_created' ] ) >= 2 ) ) #NEWLINE# for asset_id in self . testdata [ 'assets_created' ] : #NEWLINE# #INDENT# member_id = self . testdata [ 'member' ] [ 'xid' ] #NEWLINE# typepad . client . batch_request ( ) #NEWLINE# user = typepad . User . get_by_url_id ( member_id ) #NEWLINE# asset = typepad . Asset . get_by_url_id ( member_id ) #NEWLINE# typepad . client . complete_batch ( ) #NEWLINE# self . assertValidUser ( user ) #NEWLINE# self . assertValidAsset ( asset ) #NEWLINE# fav = typepad . Favorite ( ) #NEWLINE# fav . in_reply_to = asset . asset_ref #NEWLINE# user . favorites . post ( fav ) #NEWLINE# self . assertValidFavorite ( fav ) #NEWLINE# typepad . client . batch_request ( ) #NEWLINE# fav2 = typepad . Favorite . get_by_user_asset ( member_id , asset_id ) #NEWLINE# typepad . client . complete_batch ( ) #NEWLINE# self . assertValidFavorite ( fav2 )