def test_make_aggregate_sum():
    from nose.tools import assert_equal

    doc1 = {"a": 2, "b": 2, "c": 2, "visits": 201}
    doc2 = {"a": 2, "b": 2, "c": 2, "visits": 103}
    docs = [doc1, doc2]

    aggregate_doc = make_aggregate(docs, [aggregate_count("visits")])
    expected_aggregate = {"a": 2, "b": 2, "c": 2, "visits": 304}
    assert_equal(aggregate_doc, expected_aggregate)
test_make_aggregate_sum()
dataset/ETHPy150Open alphagov/performanceplatform-collector/tests/performanceplatform/collector/ga/plugins/test_aggregate.py/test_make_aggregate_sum