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