示例#1
0
def test_make_conn_string_bad_db_info():
    db_info = {
        'user': '******',
        'password': '******',
        'host': 'chickenwiki'
    }
    make_conn_string(db_info)
示例#2
0
def test_make_conn_string():
    db_info = {
        'user': '******',
        'password': '******',
        'host': 'chickenwiki',
        'dbname': 'chicken_info'
    }
    assert make_conn_string(
        db_info
    ) == 'mysql://*****:*****@chickenwiki/chicken_info?charset=utf8&use_unicode=0'
def main(filepath):
    config = load_config(filepath)  # filepath should be the path to the config
    conn_str = make_conn_string(config)
    createtable(conn_str)
示例#4
0
def main(filepath):
    config = load_config(filepath)  # filepath should be the path to the config
    conn_str = make_conn_string(config)
    createtable(conn_str)
def test_make_conn_string():
    db_info = {'user': '******', 'password': '******',
              'host': 'chickenwiki', 'dbname': 'chicken_info'}
    assert make_conn_string(db_info) == 'mysql://*****:*****@chickenwiki/chicken_info?charset=utf8&use_unicode=0'
def test_make_conn_string_bad_db_info():
    db_info = {'user': '******', 'password': '******',
              'host': 'chickenwiki'}
    make_conn_string(db_info)