def __init__(self, connection, interval): """ @param connection: pymongo Connection to use. @param interval: Delay between updates (ms). """ self._connection = connection self._timeout = interval / 1000. self._mongo_ops = MongoOps(self._connection)
def setUp(self): connection = get_connection('localhost') self._mongo_ops = MongoOps(connection)