#NEWLINE# def test_copy( self ) : #NEWLINE# #INDENT# ck = self . extension . add_checklist ( ) #NEWLINE# ck . set_title ( 'test' ) #NEWLINE# ck . set_index ( 0 ) #NEWLINE# ck . add_item_from_str ( 'test' ) #NEWLINE# ck . add_item_from_str ( 'test2' ) #NEWLINE# ck . items [ 0 ] ( ) . set_title ( 'test item' ) #NEWLINE# item = ck . items [ 1 ] ( ) #NEWLINE# item . set_title ( 'test item2' ) #NEWLINE# item . set_done ( ) #NEWLINE# ck = self . extension . add_checklist ( ) #NEWLINE# ck . set_title ( 'test2' ) #NEWLINE# ck . set_index ( 1 ) #NEWLINE# ck . add_item_from_str ( 'test3' ) #NEWLINE# cpy = self . extension_copy #NEWLINE# self . assertEqual ( len ( cpy . checklists ) , 2 ) #NEWLINE# self . assertEqual ( cpy . total_items , 3 ) #NEWLINE# self . assertEqual ( cpy . nb_items , 0 ) #NEWLINE# ck = cpy . checklists [ 0 ] ( ) #NEWLINE# self . assertEqual ( ck . get_title ( ) , 'test' ) #NEWLINE# self . assertEqual ( self . data . index , 0 ) #NEWLINE# item = ck . items [ 0 ] ( ) #NEWLINE# self . assertEqual ( item . get_title ( ) , 'test item' )