Ejemplo n.º 1
0
def mds_setup():
    "Create a fresh database with unique (random) name."
    global conn
    global old_connection_info
    old_connection_info = deepcopy(conf.connection_config)
    conf.connection_config = testing_config
    db_disconnect()
    conn = db_connect(**testing_config)
Ejemplo n.º 2
0
def mds_setup():
    "Create a fresh database with unique (random) name."
    global conn
    global old_connection_info
    old_connection_info = deepcopy(conf.connection_config)
    conf.connection_config = testing_config
    db_disconnect()
    conn = db_connect(testing_config['database'], testing_config['host'],
                      testing_config['port'])
Ejemplo n.º 3
0
def mds_teardown():
    "Drop the fresh database and disconnect."
    global old_connection_info
    conf.connection_config = deepcopy(old_connection_info)
    conn.drop_database(testing_config['database'])
    db_disconnect()
Ejemplo n.º 4
0
def mds_teardown():
    "Drop the fresh database and disconnect."
    global old_connection_info
    conf.connection_config = deepcopy(old_connection_info)
    conn.drop_database(testing_config['database'])
    db_disconnect()
Ejemplo n.º 5
0
def mds_setup():
    "Create a fresh database with unique (random) name."
    global conn
    db_disconnect()
    conn = db_connect(db_name, 'localhost', 27017)
Ejemplo n.º 6
0
def mds_teardown():
    "Drop the fresh database and disconnect."
    conn.drop_database(db_name)
    db_disconnect()
Ejemplo n.º 7
0
def mds_setup():
    "Create a fresh database with unique (random) name."
    global conn
    db_disconnect()
    conn = db_connect(db_name, 'localhost', 27017)
Ejemplo n.º 8
0
def mds_teardown():
    "Drop the fresh database and disconnect."
    conn.drop_database(db_name)
    db_disconnect()