Ejemplo n.º 1
0
def test_db_create_connection_bad_conn_string_fails():
    with raises(Exception):
        engine = db.create_connection('blah', echo=True)
Ejemplo n.º 2
0
def test_db_create_connection_only_one_arg_fails():
    with raises(Exception):
        engine = db.create_connection('sqlite:///:memory:')
Ejemplo 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
Ejemplo n.º 4
0
def test_db_create_connection_bad_conn_string_fails():
    with raises(Exception):
        engine = db.create_connection('blah', echo=True)
Ejemplo n.º 5
0
def test_db_create_connection_only_one_arg_fails():
    with raises(Exception):
        engine = db.create_connection('sqlite:///:memory:')
Ejemplo 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