summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2020-06-03 13:57:56 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2020-06-03 13:57:56 -0400
commit28b26ee9463aaa9b43c773f04a20a5d781718dea (patch)
tree0672b659dda08a4d00b3f59db29ffb82bdb97691
parente8364207ebd0c04c77e25d65b317093365749fd9 (diff)
downloadoslo-db-28b26ee9463aaa9b43c773f04a20a5d781718dea.tar.gz
Set create_constraint=True for boolean constraint test
SQLAlchemy will be defaulting create_constraint to False in an upcoming major release [1]. As this test relies upon the CHECK constraint being present, set create_constraint to True. [1] https://github.com/sqlalchemy/sqlalchemy/issues/5367 Change-Id: Ie822172ef797dc1bf8050d9b5cabe6782120ea45
-rw-r--r--oslo_db/tests/sqlalchemy/test_utils.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/oslo_db/tests/sqlalchemy/test_utils.py b/oslo_db/tests/sqlalchemy/test_utils.py
index e6174a7..50f4af1 100644
--- a/oslo_db/tests/sqlalchemy/test_utils.py
+++ b/oslo_db/tests/sqlalchemy/test_utils.py
@@ -905,7 +905,7 @@ class TestMigrationUtils(db_test_base._DbTestCase):
table_name = 'abc'
table = Table(table_name, self.meta,
Column('id', Integer, primary_key=True),
- Column('deleted', Boolean))
+ Column('deleted', Boolean(create_constraint=True)))
ck = [
const for const in table.constraints if
isinstance(const, CheckConstraint)][0]