diff --git a/tests/cut_plot_test.py b/tests/cut_plot_test.py index 821707bd..7a092561 100644 --- a/tests/cut_plot_test.py +++ b/tests/cut_plot_test.py @@ -112,6 +112,8 @@ def test_update_legend_with_line_data(self): self.axes.get_legend_handles_labels = MagicMock(return_value=( [mock_line, another_mock_line], ['mock_label', 'another_mock_label'] )) + self.cut_plot._legends_shown = True + self.cut_plot.update_legend(line_data) self.assertEqual(self.cut_plot._legends_visible, [2, 0]) self.axes.legend.assert_called_with([mock_line], ['visible_line_data_label'], fontsize=ANY)