#NEWLINE# def test_tasks_treeView_lists_only_my_tasks_if_checked( self ) : #NEWLINE# #INDENT# 'testing if the tasks_treeView lists only my tasks if\n        my_tasks_only_checkBox is checked\n        ' #NEWLINE# item_model = self . dialog . tasks_treeView . model ( ) #NEWLINE# selection_model = self . dialog . tasks_treeView . selectionModel ( ) #NEWLINE# self . dialog . my_tasks_only_checkBox . setChecked ( True ) #NEWLINE# my_tasks = self . admin . tasks #NEWLINE# all_my_parent_tasks = [ ] #NEWLINE# for task in my_tasks : #NEWLINE# #INDENT# all_my_parent_tasks += task . parents #NEWLINE# #UNINDENT# all_my_parent_tasks = list ( set ( all_my_parent_tasks ) ) #NEWLINE# for task in my_tasks : #NEWLINE# #INDENT# self . dialog . find_and_select_entity_item_in_treeView ( task , self . dialog . tasks_treeView ) #NEWLINE# self . assertEqual ( task , self . dialog . get_task ( ) ) #NEWLINE# #UNINDENT# for task in self . all_tasks : #NEWLINE# #INDENT# if ( ( task not in self ) and ( task not in all_my_parent_tasks ) ) : #NEWLINE# #INDENT# self . dialog . find_and_select_entity_item_in_treeView ( task , self . dialog . tasks_treeView ) #NEWLINE# self . assertTrue ( ( self . dialog . get_task ( ) is None ) ) #NEWLINE# #UNINDENT# #UNINDENT# self . dialog . my_tasks_only_checkBox . setChecked ( False ) #NEWLINE# for task in self . all_tasks : #NEWLINE# #INDENT# self . dialog . find_and_select_entity_item_in_treeView ( task , self . dialog . tasks_treeView ) #NEWLINE# self . assertEqual ( self . dialog . get_task ( ) , task )