def test_retrieve_aggregate(self):
        column_expressions = [Call("sum", Column("Drops"))]

        start = self.data.datasource_a.tzinfo.localize(
                datetime(2012, 12, 6, 14, 15))
        end = self.data.datasource_a.tzinfo.localize(
                datetime(2012, 12, 6, 14, 15))

        interval = start, end

        with closing(self.conn.cursor()) as cursor:
            result = retrieve_aggregated(cursor, self.data.trendstore_a,
                    column_expressions, interval, group_by=["entity_id"])

        assert result is not None
    def retrieve_aggregated(self, trendstore, column_identifiers,
            interval, group_by, subquery_filter=None, relation_table_name=None):

        with closing(self.conn.cursor()) as cursor:
            return retrieve_aggregated(cursor, trendstore, column_identifiers,
                    interval, group_by, subquery_filter, relation_table_name)