def populate_fixture(self, workbook_, worksheet_): chart_data = BubbleChartData() series_1 = chart_data.add_series('Series 1') for pt in ((1, 1.1, 10), (2, 2.2, 20)): series_1.add_data_point(*pt) series_2 = chart_data.add_series('Series 2') for pt in ((3, 3.3, 30), (4, 4.4, 40)): series_2.add_data_point(*pt) workbook_writer = BubbleWorkbookWriter(chart_data) expected_calls = [ call.write_column(1, 0, [1, 2], ANY), call.write(0, 1, 'Series 1'), call.write_column(1, 1, [1.1, 2.2], ANY), call.write(0, 2, 'Size'), call.write_column(1, 2, [10, 20], ANY), call.write_column(5, 0, [3, 4], ANY), call.write(4, 1, 'Series 2'), call.write_column(5, 1, [3.3, 4.4], ANY), call.write(4, 2, 'Size'), call.write_column(5, 2, [30, 40], ANY), ] return workbook_writer, workbook_, worksheet_, expected_calls
def _workbook_writer(self): """ The worksheet writer object to which layout and writing of the Excel worksheet for this chart will be delegated. """ return BubbleWorkbookWriter(self)