def test_headerData(self): rootnode = self.session.query(Check).filter_by(parent_id=None).first() model = GenericTreeModel(rootnode, treenode=Check) index = model.createIndex(0, 0, QtCore.QModelIndex()) headerdata = model.headerData(0, QtCore.Qt.Horizontal, QtCore.Qt.DisplayRole) self.assertEqual(headerdata, 'Folder or Check Name')
def test_headerData(self): rootnode = self.session.query(GenericSystemTreeNode).filter_by( parent_id=None).one() model = GenericTreeModel(rootnode) index = model.createIndex(0, 0, QtCore.QModelIndex()) headerdata = model.headerData(0, QtCore.Qt.Horizontal, QtCore.Qt.DisplayRole) self.assertEqual(headerdata, 'Name')