Commit bca0611c authored by Aurélien Campéas's avatar Aurélien Campéas
Browse files

really use transactions

parent 91daae37d765
......@@ -18,10 +18,8 @@ def engine(request):
uri = 'postgresql://localhost:{}/postgres'.format(port)
e = create_engine(uri)
meta = MetaData()
with e.connect() as cn:
reset(cn)
with e.connect() as cn:
init(cn, meta)
reset(e)
init(e, meta)
yield e
......
......@@ -51,7 +51,7 @@ def test_long_name(engine, tsh):
name = 'gas.lng.country.trinidad_and_tobago.net_imports.daily'
with engine.connect() as cn:
with engine.begin() as cn:
tsh.insert(cn, serie, name, 'celeste')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment