

def setUp(self):
    super(MongoClientAggregateTest, self).setUp()
    self.data = [{
        '_id': ObjectId(),
        'a': 1,
        'b': 1,
        'count': 4,
        'swallows': ['European swallow'],
        'date': datetime.datetime(2015, 10, 1, 10, 0),
    }, {
        '_id': ObjectId(),
        'a': 1,
        'b': 1,
        'count': 2,
        'swallows': ['African swallow'],
        'date': datetime.datetime(2015, 12, 1, 12, 0),
    }, {
        '_id': ObjectId(),
        'a': 1,
        'b': 2,
        'count': 4,
        'swallows': ['European swallow'],
        'date': datetime.datetime(2014, 10, 2, 12, 0),
    }, {
        '_id': ObjectId(),
        'a': 2,
        'b': 2,
        'count': 3,
        'swallows': ['African swallow', 'European swallow'],
        'date': datetime.datetime(2015, 1, 2, 10, 0),
    }, {
        '_id': ObjectId(),
        'a': 2,
        'b': 3,
        'count': 1,
        'swallows': [],
        'date': datetime.datetime(2013, 1, 3, 12, 0),
    }, {
        '_id': ObjectId(),
        'a': 1,
        'b': 4,
        'count': 5,
        'swallows': ['African swallow', 'European swallow'],
        'date': datetime.datetime(2015, 8, 4, 12, 0),
    }, {
        '_id': ObjectId(),
        'a': 4,
        'b': 4,
        'count': 4,
        'swallows': ['unladen swallow'],
        'date': datetime.datetime(2014, 7, 4, 13, 0),
    }]
    for item in item.data:
        self.cmp.do.insert(item)

dataset/ETHPy150Open vmalloc/mongomock/tests/test__mongomock.py MongoClientAggregateTest.setUp/VarMisuse@390/554 `self`->`item`