The test here commits even though integrityerror
was raised due to the fixture. Postgresql seems to allow
this even though it's usually strict about this. remove
the requirement that a database needs to be able to
commit after an integrity error was raised.
Change-Id: I437faadb04ff7a9c3f624c68646b4f4f504b504a
@requirements.duplicate_key_raises_integrity_error
def test_integrity_error(self):
- with config.db.begin() as conn:
+ with config.db.connect() as conn:
+
+ trans = conn.begin()
conn.execute(
self.tables.manual_pk.insert(),
{'id': 1, 'data': 'd1'}
{'id': 1, 'data': 'd1'}
)
+ trans.rollback()
+
class AutocommitTest(fixtures.TablesTest):