Commit b8b529ad authored by Flavio TARSETTI's avatar Flavio TARSETTI
Browse files

[test] updated/refactored test for description widget

parent 4d452a77
......@@ -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
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment