def test_previous_versions_tableWidget_is_filled_with_proper_info(self):
        # select the t1
        item_model = self.dialog.tasks_treeView.model()
        selection_model = self.dialog.tasks_treeView.selectionModel()

        index = item_model.index(0, 0)
        project1_item = item_model.itemFromIndex(index)
        # expand it
        self.dialog.tasks_treeView.expand(index)

        # get first child which is task1
        task1_item = project1_item.child(0, 0)

        # select task1
        selection_model.select(
            task1_item.index(),
            QtGui.QItemSelectionModel.Select
        )

        # select the first take
        self.dialog.takes_listWidget.setCurrentRow(0)

        # the row count should be 2
        self.assertEqual(
            self.dialog.previous_versions_tableWidget.rowCount(),
            3
        )

        # now check if the previous versions tableWidget has the info
        versions = [self.test_version1, self.test_version2, self.test_version3]
        for i in range(len(versions)):
            self.assertEqual(
                int(self.dialog.previous_versions_tableWidget.item(i, 0).text()),
                versions[i].version_number
            )

            self.assertEqual(
                self.dialog.previous_versions_tableWidget.item(i, 2).text(),
                versions[i].created_by.name
            )

            self.assertEqual(
                self.dialog.previous_versions_tableWidget.item(i, 6).text(),
                versions[i].description
            )
Marks a ticket as solved.
dataset/ETHPy150Open eoyilmaz/anima/tests/ui/test_version_creator.py/VersionCreatorTester.test_previous_versions_tableWidget_is_filled_with_proper_info--crossover with--dataset/ETHPy150Open getlogbook/logbook/logbook/ticketing.py/BackendBase.solve_ticket