Don't create enum constraints in enum sortable tests

Fixed unit test regression released in 1.3.8 that would cause failure for
Oracle, SQL Server and other non-native ENUM platforms due to new
enumeration tests added as part of 🎫`4285` enum sortability in the
unit of work; the enumerations created constraints that were duplicated on
name.

Fixes: #4285
Change-Id: I34f51e82be9b6bb43b0df8c54bb36822e6eeb73e
This commit is contained in:
Mike Bayer
2019-08-30 13:11:05 -04:00
parent f499671ccc
commit 2df613243d
2 changed files with 24 additions and 3 deletions
+9
View File
@@ -0,0 +1,9 @@
.. change::
:tags: bug, tests
:tickets: 4285
Fixed unit test regression released in 1.3.8 that would cause failure for
Oracle, SQL Server and other non-native ENUM platforms due to new
enumeration tests added as part of :ticket:`4285` enum sortability in the
unit of work; the enumerations created constraints that were duplicated on
name.
+15 -3
View File
@@ -3407,7 +3407,11 @@ class EnsurePKSortableTest(fixtures.MappedTest):
Table(
"t1",
metadata,
Column("id", Enum(cls.MySortableEnum), primary_key=True),
Column(
"id",
Enum(cls.MySortableEnum, create_constraint=False),
primary_key=True,
),
Column("data", String(10)),
)
@@ -3416,7 +3420,11 @@ class EnsurePKSortableTest(fixtures.MappedTest):
metadata,
Column(
"id",
Enum(cls.MyNotSortableEnum, sort_key_function=None),
Enum(
cls.MyNotSortableEnum,
sort_key_function=None,
create_constraint=False,
),
primary_key=True,
),
Column("data", String(10)),
@@ -3425,7 +3433,11 @@ class EnsurePKSortableTest(fixtures.MappedTest):
Table(
"t3",
metadata,
Column("id", Enum(cls.MyNotSortableEnum), primary_key=True),
Column(
"id",
Enum(cls.MyNotSortableEnum, create_constraint=False),
primary_key=True,
),
Column("value", Integer),
)