Exemplo n.º 1
0
def connection():
    utils.create_schema()
    connection = utils.db_connection()
    yield connection

    utils.drop_schema(connection)
    connection.close()
Exemplo n.º 2
0
def connection():
    utils.create_schema()

    with utils.db_connection() as connection:
        yield connection
        utils.drop_schema(connection)