#NEWLINE# def test_item( self ) : #NEWLINE# #INDENT# ck = self . extension . add_checklist ( ) #NEWLINE# self . assertEqual ( ck . total_items , 0 ) #NEWLINE# self . assertEqual ( ck . nb_items , 0 ) #NEWLINE# self . assertEqual ( ck . progress , 0 ) #NEWLINE# ck . add_item_from_str ( 'test' ) #NEWLINE# self . assertEqual ( ck . total_items , 1 ) #NEWLINE# self . assertEqual ( ck . nb_items , 0 ) #NEWLINE# self . assertEqual ( ck . progress , 0 ) #NEWLINE# item = ck . items [ 0 ] ( ) #NEWLINE# self . assertEqual ( item . get_title ( ) , 'test' ) #NEWLINE# item . set_title ( 'test2' ) #NEWLINE# self . assertEqual ( item . get_title ( ) , 'test2' ) #NEWLINE# self . assertFalse ( item . done ) #NEWLINE# item . set_done ( ) #NEWLINE# self . assertTrue ( item . done ) #NEWLINE# self . assertEqual ( ck . total_items , 1 ) #NEWLINE# self . assertEqual ( ck . nb_items , 1 ) #NEWLINE# self . assertEqual ( ck . progress , 100 ) #NEWLINE# ck . add_item_from_str ( 'test' ) #NEWLINE# self . assertEqual ( ck . progress , 50 ) #NEWLINE# item . set_done ( ) #NEWLINE# self . assertFalse ( item . done )