<s> """<STR_LIT>""" <EOL> __author__ = '<STR_LIT>' <EOL> import json <EOL> import time <EOL> from viewfinder . backend . base . message import Message <EOL> from viewfinder . backend . db . activity import Activity <EOL> from viewfinder . backend . db . comment import Comment <EOL> from viewfinder . backend . db . contact import Contact <EOL> from viewfinder . backend . db . episode import Episode <EOL> from viewfinder . backend . db . identity import Identity <EOL> from viewfinder . backend . db . photo import Photo <EOL> from viewfinder . backend . db . post import Post <EOL> from viewfinder . backend . db . user import User <EOL> from viewfinder . backend . db . user_post import UserPost <EOL> from viewfinder . backend . www . test import auth_test , service_base_test <EOL> class VersioningTestCase ( service_base_test . ServiceBaseTestCase ) : <EOL> def setUp ( self ) : <EOL> super ( VersioningTestCase , self ) . setUp ( ) <EOL> self . _validate = False <EOL> def testInlineInvalidationsMigration ( self ) : <EOL> """<STR_LIT>""" <EOL> episode_id = Episode . ConstructEpisodeId ( <NUM_LIT:1> , self . _device_ids [ <NUM_LIT:0> ] , <NUM_LIT:1> ) <EOL> photo_id = Photo . ConstructPhotoId ( <NUM_LIT:1> , self . _device_ids [ <NUM_LIT:0> ] , <NUM_LIT:1> ) <EOL> request = { '<STR_LIT>' : self . _tester . CreateActivityDict ( self . _cookie ) , <EOL> '<STR_LIT>' : { '<STR_LIT>' : episode_id , <EOL> '<STR_LIT>' : <NUM_LIT:1> } , <EOL> '<STR_LIT>' : [ self . _CreatePhotoDict ( self . _cookie , photo_id = photo_id ) ] } <EOL> self . _SendRequest ( '<STR_LIT>' , self . _cookie , request , <EOL> version = Message . EXTRACT_MD5_HASHES ) <EOL> request = { '<STR_LIT>' : [ { '<STR_LIT>' : episode_id , <EOL> '<STR_LIT>' : [ photo_id ] } ] } <EOL> self . _SendRequest ( '<STR_LIT>' , self . _cookie , request , <EOL> version = Message . EXTRACT_MD5_HASHES ) <EOL> request = { '<STR_LIT>' : self . _tester . CreateActivityDict ( self . _cookie ) , <EOL> '<STR_LIT>' : self . _user . private_vp_id , <EOL> '<STR_LIT>' : <NUM_LIT:2> } <EOL> self . _SendRequest ( '<STR_LIT>' , self . _cookie , request , <EOL> version = Message . EXTRACT_MD5_HASHES ) <EOL> response = self . _SendRequest ( '<STR_LIT>' , self . _cookie , { } , <EOL> version = Message . EXTRACT_MD5_HASHES ) <EOL> notify_dict = response [ '<STR_LIT>' ] [ <NUM_LIT:1> ] <EOL> self . assertFalse ( '<STR_LIT>' in notify_dict ) <EOL> self . assertTrue ( '<STR_LIT>' in notify_dict ) <EOL> self . assertEqual ( notify_dict [ '<STR_LIT>' ] [ '<STR_LIT>' ] , <NUM_LIT:1> ) <EOL> notify_dict = response [ '<STR_LIT>' ] [ <NUM_LIT:2> ] <EOL> self . assertFalse ( '<STR_LIT>' in notify_dict ) <EOL> self . assertFalse ( '<STR_LIT>' in notify_dict ) <EOL> notify_dict = response [ '<STR_LIT>' ] [ <NUM_LIT:3> ] <EOL> self . assertFalse ( '<STR_LIT>' in notify_dict ) <EOL> self . assertFalse ( '<STR_LIT>' in notify_dict ) <EOL> def testFileSizeExtraction ( self ) : <EOL> """<STR_LIT>""" <EOL> episode_id = Episode . ConstructEpisodeId ( <NUM_LIT:1> , self . _device_ids [ <NUM_LIT:0> ] , <NUM_LIT:1> ) <EOL> photo_id = Photo . ConstructPhotoId ( <NUM_LIT:1> , self . _device_ids [ <NUM_LIT:0> ] , <NUM_LIT:1> ) <EOL> request = { '<STR_LIT>' : self . _tester . CreateActivityDict ( self . _cookie ) , <EOL> '<STR_LIT>' : { '<STR_LIT>' : episode_id , <EOL> '<STR_LIT>' : <NUM_LIT:1> } , <EOL> '<STR_LIT>' : [ self . _CreatePhotoDict ( self . _cookie , photo_id = photo_id , <EOL> client_data = { '<STR_LIT>' : '<STR_LIT:5>' , '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , '<STR_LIT>' : '<STR_LIT>' } ) ] } <EOL> photo = request [ '<STR_LIT>' ] [ <NUM_LIT:0> ] <EOL> del photo [ '<STR_LIT>' ] <EOL> del photo [ '<STR_LIT>' ] <EOL> del photo [ '<STR_LIT>' ] <EOL> del photo [ '<STR_LIT>' ] <EOL> self . _SendRequest ( '<STR_LIT>' , self . _cookie , request , version = Message . INLINE_INVALIDATIONS ) <EOL> def testInlineCommentsMigration ( self ) : <EOL> """<STR_LIT>""" <EOL> comment_id = self . _tester . PostComment ( self . _cookie , self . _user . private_vp_id , '<STR_LIT>' ) <EOL> response_dict = self . _SendRequest ( '<STR_LIT>' , self . _cookie , <EOL> { '<STR_LIT>' : False } , <EOL> version = Message . EXTRACT_FILE_SIZES ) <EOL> notify_dict = response_dict [ '<STR_LIT>' ] [ <NUM_LIT:0> ] <EOL> invalidate = notify_dict [ '<STR_LIT>' ] <EOL> self . assertEqual ( notify_dict [ '<STR_LIT:name>' ] , '<STR_LIT>' ) <EOL> timestamp , device_id , uniquifier = Comment . DeconstructCommentId ( comment_id ) <EOL> start_key = Comment . ConstructCommentId ( timestamp , <NUM_LIT:0> , <NUM_LIT:0> ) <EOL> self . assertEqual ( invalidate , { '<STR_LIT>' : [ { '<STR_LIT>' : self . _user . private_vp_id , <EOL> '<STR_LIT>' : True , <EOL> '<STR_LIT>' : start_key } ] } ) <EOL> def testSplitNamesMigration ( self ) : <EOL> """<STR_LIT>""" <EOL> self . _SendRequest ( '<STR_LIT>' , self . _cookie , <EOL> { '<STR_LIT:name>' : '<STR_LIT>' } , <EOL> version = Message . INLINE_COMMENTS ) <EOL> user = self . _RunAsync ( User . Query , self . _client , self . _user . user_id , None ) <EOL> self . assertEqual ( user . name , '<STR_LIT>' ) <EOL> self . assertEqual ( user . given_name , '<STR_LIT>' ) <EOL> self . assertEqual ( user . family_name , '<STR_LIT>' ) <EOL> self . _SendRequest ( '<STR_LIT>' , self . _cookie , <EOL> { '<STR_LIT:name>' : '<STR_LIT>' } , <EOL> version = Message . INLINE_COMMENTS ) <EOL> user = self . _RunAsync ( User . Query , self . _client , self . _user . user_id , None ) <EOL> self . assertEqual ( user . name , '<STR_LIT>' ) <EOL> self . assertEqual ( user . given_name , '<STR_LIT>' ) <EOL> self . assertIsNone ( user . family_name ) <EOL> def testExplicitShareOrderMigration ( self ) : <EOL> """<STR_LIT>""" <EOL> def _IsEpDictOrderedAsOriginalAlgorithm ( ep_dicts , episode_id_key ) : <EOL> """<STR_LIT>""" <EOL> last_episode_id = None <EOL> for ep_dict in ep_dicts : <EOL> if last_episode_id is not None and ep_dict [ episode_id_key ] >= last_episode_id : <EOL> return False <EOL> last_episode_id = ep_dict [ episode_id_key ] <EOL> last_photo_id = None <EOL> for photo_id in ep_dict [ '<STR_LIT>' ] : <EOL> if last_photo_id is not None and photo_id <= last_photo_id : <EOL> return False <EOL> last_photo_id = photo_id <EOL> return True <EOL> def _ConstructEpDict ( ) : <EOL> """<STR_LIT>""" <EOL> episode_id1 , photo_ids1 = self . _UploadOneEpisode ( self . _cookie , <NUM_LIT:2> ) <EOL> episode_id2 , photo_ids2 = self . _UploadOneEpisode ( self . _cookie , <NUM_LIT:2> ) <EOL> ep_dicts = self . _tester . _CreateCopyDictList ( self . _cookie , <EOL> [ ( episode_id1 , photo_ids1 ) , <EOL> ( episode_id2 , photo_ids2 ) ] ) <EOL> ep_dicts = sorted ( ep_dicts , key = lambda e : e [ '<STR_LIT>' ] ) <EOL> for episode in ep_dicts : <EOL> episode [ '<STR_LIT>' ] = sorted ( episode [ '<STR_LIT>' ] , reverse = True ) <EOL> self . assertFalse ( _IsEpDictOrderedAsOriginalAlgorithm ( ep_dicts , '<STR_LIT>' ) , <EOL> '<STR_LIT>' ) <EOL> return ep_dicts <EOL> ep_dicts1 = _ConstructEpDict ( ) <EOL> ep_dicts2 = _ConstructEpDict ( ) <EOL> request_dict = { '<STR_LIT>' : self . _tester . CreateActivityDict ( self . _cookie ) , <EOL> '<STR_LIT>' : self . _CreateViewpointDict ( self . _cookie ) , <EOL> '<STR_LIT>' : ep_dicts1 , <EOL> '<STR_LIT>' : self . _tester . CreateContactDicts ( [ self . _user2 . user_id , self . _user3 . user_id ] ) } <EOL> self . _SendRequest ( '<STR_LIT>' , self . _cookie , request_dict , version = Message . INLINE_COMMENTS ) <EOL> request_dict = { '<STR_LIT>' : self . _tester . CreateActivityDict ( self . _cookie ) , <EOL> '<STR_LIT>' : request_dict [ '<STR_LIT>' ] [ '<STR_LIT>' ] , <EOL> '<STR_LIT>' : ep_dicts2 } <EOL> self . _SendRequest ( '<STR_LIT>' , self . _cookie , request_dict , version = Message . INLINE_COMMENTS ) <EOL> activities = self . _RunAsync ( Activity . RangeQuery , <EOL> self . _client , <EOL> request_dict [ '<STR_LIT>' ] , <EOL> range_desc = None , <EOL> limit = <NUM_LIT:50> , <EOL> col_names = None , <EOL> scan_forward = False ) <EOL> for activity in activities : <EOL> args_dict = json . loads ( activity . json ) <EOL> self . assertTrue ( _IsEpDictOrderedAsOriginalAlgorithm ( args_dict [ '<STR_LIT>' ] , '<STR_LIT>' ) , <EOL> '<STR_LIT>' ) <EOL> def testSuppressBlankCoverPhotoMigration ( self ) : <EOL> """<STR_LIT>""" <EOL> episode_id1 , photo_ids1 = self . _UploadOneEpisode ( self . _cookie , <NUM_LIT:2> ) <EOL> ep_dicts = self . _tester . _CreateCopyDictList ( self . _cookie , [ ( episode_id1 , photo_ids1 ) ] ) <EOL> update_vp_dict = { '<STR_LIT>' : { '<STR_LIT>' : episode_id1 , '<STR_LIT>' : '<STR_LIT>' } } <EOL> request_dict = { '<STR_LIT>' : self . _tester . CreateActivityDict ( self . _cookie ) , <EOL> '<STR_LIT>' : self . _CreateViewpointDict ( self . _cookie , ** update_vp_dict ) , <EOL> '<STR_LIT>' : ep_dicts , <EOL> '<STR_LIT>' : self . _tester . CreateContactDicts ( [ self . _user2 . user_id ] ) } <EOL> self . _SendRequest ( '<STR_LIT>' , self . _cookie , request_dict , version = Message . EXPLICIT_SHARE_ORDER ) <EOL> def testSupportMultipleIdentitiesPerContact ( self ) : <EOL> """<STR_LIT>""" <EOL> identity_key = '<STR_LIT>' + self . _user2 . email <EOL> self . _UpdateOrAllocateDBObject ( Identity , key = identity_key , user_id = <NUM_LIT> ) <EOL> contact_dict = Contact . CreateContactDict ( user_id = self . _user . user_id , <EOL> identities_properties = [ ( identity_key , '<STR_LIT>' ) , <EOL> ( '<STR_LIT>' + self . _user3 . email , '<STR_LIT>' ) , <EOL> ( '<STR_LIT>' , '<STR_LIT>' ) ] , <EOL> timestamp = <NUM_LIT:1> , <EOL> contact_source = Contact . GMAIL , <EOL> name = '<STR_LIT>' , <EOL> given_name = '<STR_LIT>' , <EOL> family_name = '<STR_LIT>' , <EOL> rank = <NUM_LIT:3> ) <EOL> self . _UpdateOrAllocateDBObject ( Contact , ** contact_dict ) <EOL> contact_dict = Contact . CreateContactDict ( user_id = self . _user . user_id , <EOL> identities_properties = None , <EOL> timestamp = <NUM_LIT:1> , <EOL> contact_source = Contact . GMAIL , <EOL> contact_id = '<STR_LIT>' , <EOL> sort_key = Contact . CreateSortKey ( '<STR_LIT>' , <NUM_LIT:1> ) , <EOL> labels = [ Contact . REMOVED ] ) <EOL> self . _UpdateOrAllocateDBObject ( Contact , ** contact_dict ) <EOL> contact_dict = Contact . CreateContactDict ( user_id = self . _user . user_id , <EOL> identities_properties = [ ( '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT>' , '<STR_LIT>' ) ] , <EOL> timestamp = <NUM_LIT:1> , <EOL> contact_source = Contact . GMAIL , <EOL> name = '<STR_LIT>' , <EOL> given_name = '<STR_LIT>' , <EOL> family_name = '<STR_LIT>' , <EOL> rank = <NUM_LIT:5> ) <EOL> self . _UpdateOrAllocateDBObject ( Contact , ** contact_dict ) <EOL> contact_dict = Contact . CreateContactDict ( user_id = self . _user . user_id , <EOL> identities_properties = [ ( '<STR_LIT>' , '<STR_LIT>' ) ] , <EOL> timestamp = <NUM_LIT:1> , <EOL> contact_source = Contact . GMAIL , <EOL> name = '<STR_LIT>' , <EOL> given_name = '<STR_LIT>' , <EOL> family_name = '<STR_LIT>' , <EOL> rank = <NUM_LIT> ) <EOL> self . _UpdateOrAllocateDBObject ( Contact , ** contact_dict ) <EOL> contact_dict = Contact . CreateContactDict ( user_id = self . _user . user_id , <EOL> identities_properties = [ ] , <EOL> timestamp = <NUM_LIT:1> , <EOL> contact_source = Contact . GMAIL , <EOL> name = '<STR_LIT>' , <EOL> given_name = '<STR_LIT>' , <EOL> family_name = '<STR_LIT>' , <EOL> rank = <NUM_LIT> ) <EOL> self . _UpdateOrAllocateDBObject ( Contact , ** contact_dict ) <EOL> response = self . _SendRequest ( '<STR_LIT>' , self . _cookie , { } , version = Message . SUPPRESS_BLANK_COVER_PHOTO ) <EOL> self . assertEqual ( response [ '<STR_LIT>' ] , { '<STR_LIT:version>' : Message . SUPPRESS_BLANK_COVER_PHOTO } ) <EOL> self . assertEqual ( response [ '<STR_LIT>' ] , <NUM_LIT:2> ) <EOL> response_contact = response [ '<STR_LIT>' ] [ <NUM_LIT:1> ] <EOL> self . assertEqual ( response_contact [ '<STR_LIT:name>' ] , '<STR_LIT>' ) <EOL> self . assertEqual ( response_contact [ '<STR_LIT>' ] , '<STR_LIT>' ) <EOL> self . assertEqual ( response_contact [ '<STR_LIT>' ] , '<STR_LIT>' ) <EOL> self . assertEqual ( response_contact [ '<STR_LIT>' ] , <NUM_LIT:3> ) <EOL> self . assertEqual ( response_contact [ '<STR_LIT>' ] , <NUM_LIT> ) <EOL> self . assertEqual ( response_contact [ '<STR_LIT>' ] , identity_key ) <EOL> self . assertFalse ( '<STR_LIT>' in response_contact ) <EOL> self . assertFalse ( '<STR_LIT>' in response_contact ) <EOL> self . assertFalse ( '<STR_LIT>' in response_contact ) <EOL> self . assertFalse ( '<STR_LIT>' in response_contact ) <EOL> response_contact = response [ '<STR_LIT>' ] [ <NUM_LIT:0> ] <EOL> self . assertEqual ( response_contact [ '<STR_LIT:name>' ] , '<STR_LIT>' ) <EOL> self . assertEqual ( response_contact [ '<STR_LIT>' ] , '<STR_LIT>' ) <EOL> self . assertEqual ( response_contact [ '<STR_LIT>' ] , '<STR_LIT>' ) <EOL> self . assertEqual ( response_contact [ '<STR_LIT>' ] , <NUM_LIT:5> ) <EOL> self . assertEqual ( response_contact [ '<STR_LIT>' ] , '<STR_LIT>' ) <EOL> self . assertFalse ( '<STR_LIT>' in response_contact ) <EOL> self . assertFalse ( '<STR_LIT>' in response_contact ) <EOL> self . assertFalse ( '<STR_LIT>' in response_contact ) <EOL> self . assertFalse ( '<STR_LIT>' in response_contact ) <EOL> self . assertFalse ( '<STR_LIT>' in response_contact ) <EOL> def testRenamePhotoLabelMigration ( self ) : <EOL> """<STR_LIT>""" <EOL> ep_id , ph_ids = self . _UploadOneEpisode ( self . _cookie , <NUM_LIT:2> ) <EOL> response_dict = self . _SendRequest ( '<STR_LIT>' , self . _cookie , <EOL> { '<STR_LIT>' : [ { '<STR_LIT>' : ep_id , <EOL> '<STR_LIT>' : ph_ids [ : <NUM_LIT:1> ] } , <EOL> { '<STR_LIT>' : ep_id , <EOL> '<STR_LIT>' : ph_ids [ <NUM_LIT:1> : ] } ] } , <EOL> version = Message . SUPPORT_MULTIPLE_IDENTITIES_PER_CONTACT ) <EOL> post_id = Post . ConstructPostId ( ep_id , ph_ids [ <NUM_LIT:0> ] ) <EOL> self . _UpdateOrAllocateDBObject ( UserPost , <EOL> user_id = self . _user . user_id , <EOL> post_id = post_id , <EOL> labels = [ UserPost . HIDDEN ] ) <EOL> response_dict = self . _SendRequest ( '<STR_LIT>' , self . _cookie , <EOL> { '<STR_LIT>' : [ { '<STR_LIT>' : ep_id , <EOL> '<STR_LIT>' : True , <EOL> '<STR_LIT>' : True } , <EOL> { '<STR_LIT>' : ep_id , <EOL> '<STR_LIT>' : True } , <EOL> { '<STR_LIT>' : ep_id } ] } , <EOL> version = Message . SUPPORT_MULTIPLE_IDENTITIES_PER_CONTACT ) <EOL> labels = [ ph_dict [ '<STR_LIT>' ] for ep_dict in response_dict [ '<STR_LIT>' ] for ph_dict in ep_dict . get ( '<STR_LIT>' , [ ] ) ] <EOL> self . assertEqual ( labels , [ [ u'<STR_LIT>' ] , [ u'<STR_LIT>' ] , [ u'<STR_LIT>' ] , [ u'<STR_LIT>' ] ] ) <EOL> def testSuppressAuthNameMigration ( self ) : <EOL> """<STR_LIT>""" <EOL> user_dict = { '<STR_LIT:name>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT:email>' : '<STR_LIT>' } <EOL> user , device_id = self . _tester . RegisterViewfinderUser ( user_dict , None ) <EOL> user_cookie = self . _GetSecureUserCookie ( user , device_id ) <EOL> url = self . _tester . GetUrl ( '<STR_LIT>' ) <EOL> request_dict = { '<STR_LIT>' : { '<STR_LIT:version>' : Message . RENAME_PHOTO_LABEL , <EOL> '<STR_LIT>' : True } , <EOL> '<STR_LIT>' : { '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT:name>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' } } <EOL> response = auth_test . _SendAuthRequest ( self . _tester , <EOL> url , <EOL> '<STR_LIT:POST>' , <EOL> user_cookie = user_cookie , <EOL> request_dict = request_dict ) <EOL> self . assertEqual ( response . code , <NUM_LIT:200> ) <EOL> def testSupportRemovedFollowers ( self ) : <EOL> """<STR_LIT>""" <EOL> self . _CreateSimpleTestAssets ( ) <EOL> vp_id , _ = self . _ShareSimpleTestAssets ( [ self . _user2 . user_id , self . _user3 . user_id ] ) <EOL> self . _tester . RemoveFollowers ( self . _cookie , vp_id , [ self . _user3 . user_id ] ) <EOL> response_dict = self . _SendRequest ( '<STR_LIT>' , self . _cookie , <EOL> { '<STR_LIT>' : [ { '<STR_LIT>' : vp_id , <EOL> '<STR_LIT>' : True } ] } , <EOL> version = Message . SEND_EMAIL_TOKEN ) <EOL> self . assertEqual ( response_dict [ '<STR_LIT>' ] [ <NUM_LIT:0> ] [ '<STR_LIT>' ] , [ <NUM_LIT:1> , <NUM_LIT:2> , <NUM_LIT:3> ] ) <EOL> def testSuppressCopyTimestamp ( self ) : <EOL> """<STR_LIT>""" <EOL> self . _CreateSimpleTestAssets ( ) <EOL> new_episode_id = Episode . ConstructEpisodeId ( time . time ( ) , self . _device_ids [ <NUM_LIT:0> ] , self . _test_id ) <EOL> self . _test_id += <NUM_LIT:1> <EOL> request_dict = { '<STR_LIT>' : self . _tester . CreateActivityDict ( self . _cookie ) , <EOL> '<STR_LIT>' : self . _CreateViewpointDict ( self . _cookie ) , <EOL> '<STR_LIT>' : [ { '<STR_LIT>' : self . _episode_id , <EOL> '<STR_LIT>' : new_episode_id , <EOL> '<STR_LIT>' : time . time ( ) , <EOL> '<STR_LIT>' : self . _photo_ids } ] , <EOL> '<STR_LIT>' : self . _tester . CreateContactDicts ( [ self . _user2 . user_id ] ) } <EOL> self . _SendRequest ( '<STR_LIT>' , self . _cookie , request_dict , version = Message . SUPPORT_REMOVED_FOLLOWERS ) <EOL> new_episode_id2 = Episode . ConstructEpisodeId ( time . time ( ) , self . _device_ids [ <NUM_LIT:0> ] , self . _test_id ) <EOL> self . _test_id += <NUM_LIT:1> <EOL> request_dict = { '<STR_LIT>' : self . _tester . CreateActivityDict ( self . _cookie ) , <EOL> '<STR_LIT>' : request_dict [ '<STR_LIT>' ] [ '<STR_LIT>' ] , <EOL> '<STR_LIT>' : [ { '<STR_LIT>' : self . _episode_id2 , <EOL> '<STR_LIT>' : new_episode_id2 , <EOL> '<STR_LIT>' : time . time ( ) , <EOL> '<STR_LIT>' : self . _photo_ids2 } ] } <EOL> self . _SendRequest ( '<STR_LIT>' , self . _cookie , request_dict , version = Message . SUPPORT_REMOVED_FOLLOWERS ) <EOL> save_episode_id = Episode . ConstructEpisodeId ( time . time ( ) , self . _device_ids [ <NUM_LIT:1> ] , self . _test_id ) <EOL> self . _test_id += <NUM_LIT:1> <EOL> request_dict = { '<STR_LIT>' : self . _tester . CreateActivityDict ( self . _cookie2 ) , <EOL> '<STR_LIT>' : [ { '<STR_LIT>' : new_episode_id , <EOL> '<STR_LIT>' : save_episode_id , <EOL> '<STR_LIT>' : time . time ( ) , <EOL> '<STR_LIT>' : self . _photo_ids } ] } <EOL> self . _SendRequest ( '<STR_LIT>' , self . _cookie2 , request_dict , version = Message . SUPPORT_REMOVED_FOLLOWERS ) <EOL> def testSupportContactLimits ( self ) : <EOL> """<STR_LIT>""" <EOL> request_dict = { '<STR_LIT>' : [ { '<STR_LIT>' : Contact . MANUAL , <EOL> '<STR_LIT:name>' : '<STR_LIT:a>' * <NUM_LIT> , <EOL> '<STR_LIT>' : '<STR_LIT:a>' * <NUM_LIT> , <EOL> '<STR_LIT>' : '<STR_LIT:a>' * <NUM_LIT> , <EOL> '<STR_LIT>' : [ { '<STR_LIT>' : '<STR_LIT>' % ( '<STR_LIT:a>' * <NUM_LIT> ) , '<STR_LIT:description>' : '<STR_LIT:a>' * <NUM_LIT> } <EOL> for i in xrange ( <NUM_LIT:100> ) ] } ] } <EOL> self . _SendRequest ( '<STR_LIT>' , self . _cookie , request_dict , version = Message . SUPPRESS_COPY_TIMESTAMP ) <EOL> def testSuppressEmptyTitle ( self ) : <EOL> """<STR_LIT>""" <EOL> self . _CreateSimpleTestAssets ( ) <EOL> vp_id , ep_id = self . _ShareSimpleTestAssets ( [ self . _user2 . user_id ] ) <EOL> request_dict = { '<STR_LIT>' : self . _tester . CreateActivityDict ( self . _cookie ) , <EOL> '<STR_LIT>' : vp_id , <EOL> '<STR_LIT:title>' : '<STR_LIT>' } <EOL> self . _SendRequest ( '<STR_LIT>' , self . _cookie , request_dict , version = Message . SUPPORT_CONTACT_LIMITS ) <EOL> def _TestMethodNotSupported ( self , method , version ) : <EOL> """<STR_LIT>""" <EOL> self . assertRaisesHttpError ( <NUM_LIT> , self . _SendRequest , method , self . _cookie , { } , version = version ) </s>
