Fix rollback of savepoints for full DB tests

This commit is contained in:
Joseph Schorr 2018-07-16 11:44:19 -04:00
parent eb8e325f94
commit cdaa312d0b

View file

@ -153,6 +153,7 @@ def initialized_db(appconfig):
yield # Run the test.
try:
test_savepoint.rollback()
test_savepoint.__exit__(None, None, None)
except InternalError:
# If postgres fails with an exception (like IntegrityError) mid-transaction, it terminates