after the bound metadata merge the unitofwork.TransactionTest
became deprecations.AutocommitClosesOnFail and was found to
be not actually running correctly on SQLite. This test
should only run on a backend that has deferrable FKs,
which includes PostgreSQL; so add that to requirements. this
in turn requires clarification of test_naturalpks that the
"deferrable FKs" req there is more about Oracle and its lack
of ON UPDATE cascades.
Change-Id: I867a164679274940803852c1af0920da74683bfa
class AutocommitClosesOnFailTest(fixtures.MappedTest):
- __requires__ = ("deferrable_or_no_constraints",)
+ __requires__ = ("deferrable_fks",)
@classmethod
def define_tables(cls, metadata):
def _backend_specific_fk_args():
- if testing.requires.deferrable_fks.enabled:
+ if (
+ testing.requires.deferrable_fks.enabled
+ and testing.requires.non_updating_cascade.enabled
+ ):
fk_args = dict(deferrable=True, initially="deferred")
elif not testing.requires.on_update_cascade.enabled:
fk_args = dict()
def deferrable_fks(self):
"""target database must support deferrable fks"""
- return only_on(["oracle"])
+ return only_on(["oracle", "postgresql"])
@property
def foreign_key_constraint_option_reflection_ondelete(self):