diff --git a/beat/editor/test/test_editors.py b/beat/editor/test/test_editors.py index bf2e9f9016c5c023bba07198da37844626ab0f7e..058b137991f52bef30806f04b1fd8d5468d07b93 100644 --- a/beat/editor/test/test_editors.py +++ b/beat/editor/test/test_editors.py @@ -45,7 +45,9 @@ class MockAssetEditor(AbstractAssetEditor): super(MockAssetEditor, self).__init__(parent) self.dataformat_model = None self.add_field_button = QPushButton(self.tr("Add")) + self.description = DescriptionWidget() layout = QVBoxLayout(self) + layout.addWidget(self.description) layout.addWidget(self.add_field_button) self.add_field_button.clicked.connect(self.__add_field) @@ -80,19 +82,12 @@ class MockAssetEditor(AbstractAssetEditor): def set_description(self, desc): """Sets the text description of the asset""" - description = DescriptionWidget() - description.short_description = desc - self.layout().addWidget(description) + self.description.short_description = desc def get_description(self): """Returns the text description of the asset""" - description_list = self.findChildren(DescriptionWidget) - - text_data = None - - description = description_list[0] - text_data = description.short_description + text_data = self.description.short_description return text_data