def testAggregateCumulate(self):

        period = self.period
        assertEqual = self.assertEqual

        # Aggregate
        totals = period.aggregate([S3TimeSeriesFact("sum", "base"),
                                   S3TimeSeriesFact("cumulate",
                                                    "base",
                                                    slope="slope",
                                                    interval="days",
                                                    ),
                                   ]
                                  )

        # Check rows
        expected_rows = {"A": [180, 369],
                         "B": [370, 709],
                         "C": [810, 1170],
                         }
        rows = period.rows
        assertEqual(set(rows.keys()), set(expected_rows.keys()))
        for k, v in rows.items():
            assertEqual(v, expected_rows.get(k),
                        msg = "Row %s: %s != %s" %
                              (k, v, expected_rows.get(k)))

        # Check columns
        expected_cols = {1: [430, 624],
                         2: [290, 529],
                         3: [640, 1095],
                         }
        cols = period.cols
        assertEqual(set(cols.keys()), set(expected_cols.keys()))
        for k, v in cols.items():
            assertEqual(v, expected_cols.get(k),
                        msg = "Column %s: %s != %s" %
                              (k, v, expected_cols.get(k)))

        # Check matrix
        expected_matrix = {("A", 1): [80, 144],
                           ("A", 2): [100, 155],
                           ("A", 3): [0, 70],
                           ("B", 2): [130, 294],
                           ("B", 3): [240, 415],
                           ("C", 1): [350, 480],
                           ("C", 2): [60, 80],
                           ("C", 3): [400, 610],
                           }
        matrix = period.matrix
        assertEqual(set(matrix.keys()), set(expected_matrix.keys()))
        for k, v in matrix.items():
            assertEqual(v, expected_matrix.get(k),
                        msg = "Cell %s: %s != %s" %
                              (k, v, expected_matrix.get(k)))

        # Check total
        expected_totals = [1360, 2248]
        assertEqual(period.totals, expected_totals)
        assertEqual(totals, expected_totals)

# =============================================================================
For the given dict containing a ``DataTable`` and a ``TableTab``
dataset/ETHPy150Open sahana/eden/modules/unit_tests/s3/s3timeplot.py/PeriodTests.testAggregateCumulate--crossover with--dataset/ETHPy150Open CiscoSystems/avos/horizon/tabs/views.py/TabbedTableView.handle_table