#NEWLINE# @ attr ( user = 'member' ) #NEWLINE# def test_0_setup_test_data( self ) : #NEWLINE# #INDENT# 'Sets up some test data for our group.' #NEWLINE# group_id = self . testdata [ 'group' ] [ 'xid' ] #NEWLINE# member_id = self . testdata [ 'member' ] [ 'xid' ] #NEWLINE# post1 = self . post_asset ( ) #NEWLINE# post1 . content = 'This post is needed to test list operations.' #NEWLINE# typepad . Group . get_by_url_id ( group_id ) . post_assets . post ( post1 ) #NEWLINE# self . assertValidAsset ( post1 ) #NEWLINE# self . testdata [ 'assets_created' ] . append ( post1 . url_id ) #NEWLINE# time . sleep ( 2 ) #NEWLINE# post2 = self . post_asset ( ) #NEWLINE# post2 . content = 'This post will be favorited and commented on.' #NEWLINE# typepad . Group . get_by_url_id ( group_id ) . post_assets . post ( post2 ) #NEWLINE# self . assertValidAsset ( post2 ) #NEWLINE# self . testdata [ 'assets_created' ] . append ( post2 . url_id ) #NEWLINE# typepad . client . batch_request ( ) #NEWLINE# user = typepad . User . get_by_url_id ( member_id ) #NEWLINE# typepad . client . complete_batch ( ) #NEWLINE# fav = typepad . Favorite ( ) #NEWLINE# fav . in_reply_to = post1 . asset_ref #NEWLINE# user . favorites . post ( fav ) #NEWLINE# self . assertValidFavorite ( fav ) #NEWLINE# content = 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.' #NEWLINE# comment1 = typepad . Comment ( ) #NEWLINE# comment1 . title = '' #NEWLINE# comment1 . content = content #NEWLINE# post1 . comments . post ( comment1 ) #NEWLINE# self . assertValidAsset ( comment1 ) #NEWLINE# self . assertEquals ( comment1 . in_reply_to . url_id , post1 . url_id ) #NEWLINE# self . assertEquals ( comment1 . content , content ) #NEWLINE# self . testdata [ 'comments_created' ] . append ( comment1 . url_id ) #NEWLINE# content = 'Yeah, what he said.' #NEWLINE# comment2 = typepad . Comment ( ) #NEWLINE# comment2 . title = '' #NEWLINE# comment2 . content = content #NEWLINE# post1 . comments . post ( comment2 ) #NEWLINE# self . assertValidAsset ( comment2 ) #NEWLINE# self . assertEquals ( comment2 . in_reply_to . url_id , post1 . url_id ) #NEWLINE# self . testdata [ 'comments_created' ] . append ( comment2 . url_id ) #NEWLINE# self . load_test_assets ( )