#NEWLINE# def test_migration( self ) : #NEWLINE# #INDENT# BoxUserSettings . remove ( ) #NEWLINE# user = UserFactory ( ) #NEWLINE# node = ProjectFactory ( creator = user ) #NEWLINE# account = BoxAccountFactory ( ) #NEWLINE# user . external_accounts = [ account ] #NEWLINE# user . add_addon ( 'box' , auth = Auth ( user ) ) #NEWLINE# user_addon = user . get_addon ( 'box' ) #NEWLINE# user_addon . save ( ) #NEWLINE# node . add_addon ( 'box' , auth = Auth ( user ) ) #NEWLINE# node_addon = node . get_addon ( 'box' ) #NEWLINE# node_addon . foreign_user_settings = user_addon #NEWLINE# node_addon . folder_id = 'abcdef0' #NEWLINE# node_addon . folder_path = '/' #NEWLINE# node_addon . folder_name = '/ (Full Box)' #NEWLINE# node_addon . save ( ) #NEWLINE# assert_equal ( node_addon . external_account , None ) #NEWLINE# assert_equal ( account . folder_id , 'abcdef0' ) #NEWLINE# do_migration ( ) #NEWLINE# node_addon . reload ( ) #NEWLINE# assert_equal ( node_addon . external_account , account ) #NEWLINE# assert_equal ( node_addon . folder_id , 'abcdef0' ) #NEWLINE# assert_equal ( node_addon . folder_path , '/' ) #NEWLINE# assert_equal ( node_addon . folder_name , '/ (Full Box)' )