Commit 501e227e authored by Samuel GAIST's avatar Samuel GAIST
Browse files

[widgets][plottereditor] Remove test specific method

It was not needed at all.
parent 459d8c32
Pipeline #31926 passed with stage
in 11 minutes and 13 seconds
......@@ -79,31 +79,29 @@ class TestParameterViewer:
class TestPlotterEditor:
"""Test that the plotter editor works correctly"""
def test_load_and_dump(self, qtbot, dataformat_model, test_prefix):
def test_load_and_dump(self, qtbot, dataformat_model, test_prefix, beat_context):
asset_name = "user/scatter/1"
asset = Asset(test_prefix, AssetType.PLOTTER, asset_name)
with open(asset.declaration_path, "rt") as json_file:
json_data = json.load(json_file)
editor = PlotterEditor()
editor.set_dataformat_model_to_combobox(dataformat_model)
editor.load_json(json_data)
json_data = asset.declaration
editor = PlotterEditor()
editor.set_context(beat_context)
editor.load_json(json_data)
qtbot.addWidget(editor)
qtbot.addWidget(editor)
assert editor.dump_json() == json_data
assert editor.dump_json() == json_data
def test_change_dataformat(self, qtbot, dataformat_model, test_prefix):
def test_change_dataformat(self, qtbot, dataformat_model, test_prefix, beat_context):
asset_name = "user/scatter/1"
asset = Asset(test_prefix, AssetType.PLOTTER, asset_name)
with open(asset.declaration_path, "rt") as json_file:
json_data = json.load(json_file)
editor = PlotterEditor()
editor.set_dataformat_model_to_combobox(dataformat_model)
editor.load_json(json_data)
json_data = asset.declaration
editor = PlotterEditor()
editor.set_context(beat_context)
editor.load_json(json_data)
qtbot.addWidget(editor)
qtbot.addWidget(editor)
assert editor.dump_json() == json_data
assert editor.dump_json() == json_data
asset_list = dataformat_model.stringList()
qtbot.keyClicks(editor.dataformat_combobox, asset_list[1])
......
......@@ -151,9 +151,6 @@ class PlotterEditor(AbstractAssetEditor):
lambda: self.library_model.setPrefixPath(self.prefix_path)
)
def set_dataformat_model_to_combobox(self, dataformat_model):
self.dataformat_combobox.setModel(dataformat_model)
@property
def parameter_viewers(self):
return self.scroll_widget.widget_list
......
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