#NEWLINE# def test_get_new_version_with_publish_check_box_is_checked_creates_published_version( self ) : #NEWLINE# #INDENT# 'testing if checking publish_checkbox will create a published Version\n        instance\n        ' #NEWLINE# item_model = self . dialog . tasks_treeView . model ( ) #NEWLINE# selection_model = self . dialog . tasks_treeView . selectionModel ( ) #NEWLINE# index = item_model . index ( 0 , 0 ) #NEWLINE# project1_item = item_model . itemFromIndex ( index ) #NEWLINE# self . dialog . tasks_treeView . expand ( index ) #NEWLINE# task1_item = project1_item . child ( 0 , 0 ) #NEWLINE# selection_model . select ( task1_item . index ( ) , QtGui . QItemSelectionModel . Select ) #NEWLINE# new_version = self . dialog . get_new_version ( ) #NEWLINE# self . assertFalse ( new_version . is_published ) #NEWLINE# self . assertEqual ( new_version . task , self . test_task1 ) #NEWLINE# self . dialog . publish_checkBox . setChecked ( True ) #NEWLINE# new_version = self . dialog . get_new_version ( ) #NEWLINE# self . assertEqual ( new_version . task , self . test_task1 ) #NEWLINE# self . assertTrue ( new_version . is_published )