Merge very similar code in test_aggregates_negative

In test_aggregate_negative.py, the multi lines of creating
test aggregate are repeated for many times, so we can use
a common function to replace them, and so to keep code simple
and clean.

Change-Id: I99701de6a6c605b81a630179774dd89327788950
1 file changed