Exemplo n.º 1
0
def test_db_create_connection_bad_conn_string_fails():
    with raises(Exception):
        engine = db.create_connection('blah', echo=True)
Exemplo n.º 2
0
def test_db_create_connection_only_one_arg_fails():
    with raises(Exception):
        engine = db.create_connection('sqlite:///:memory:')
Exemplo n.º 3
0
def test_db_create_connection_without_echo():
    engine = db.create_connection('sqlite:///:memory:', echo=False)
    assert engine is not None
    assert not engine._echo
Exemplo n.º 4
0
def test_db_create_connection_bad_conn_string_fails():
    with raises(Exception):
        engine = db.create_connection('blah', echo=True)
Exemplo n.º 5
0
def test_db_create_connection_only_one_arg_fails():
    with raises(Exception):
        engine = db.create_connection('sqlite:///:memory:')
Exemplo n.º 6
0
def test_db_create_connection_without_echo():
    engine = db.create_connection('sqlite:///:memory:', echo=False)
    assert engine is not None
    assert not engine._echo