def setup_db():

    client = MongoClient(api.config.testing_mongo_addr,
                         api.config.testing_mongo_port)[api.config.testing_mongo_db_name]

    if len(client.collection_names()) != 0:
        client.connection.drop_database(api.config.testing_mongo_db_name)

    #Set debug client for mongo
    if api.common.external_client is None:
        api.common.external_client = client

    return client
Get Token at current input pointer + i ahead where i=1 is next Token.
dataset/ETHPy150Open EasyCTF/easyctf-2015/api/tests/conftest.py/setup_db--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/lib/antlr3/antlr3/streams.py/TokenStream.LT