diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2015-08-27 18:04:25 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2015-08-27 18:04:25 -0400 |
| commit | ed535649d423020c816e66869016992df25e456e (patch) | |
| tree | d5a2dbbcf635a520e1fa350715acbec0ec15e571 /test/sql | |
| parent | d459afa8dbf73b8d9d620d09dede97e3461b6b3f (diff) | |
| download | sqlalchemy-ed535649d423020c816e66869016992df25e456e.tar.gz | |
- The :class:`.TypeDecorator` type extender will now work in conjunction
with a :class:`.SchemaType` implementation, typically :class:`.Enum`
or :class:`.Boolean` with regards to ensuring that the per-table
events are propagated from the implementation type to the outer type.
These events are used
to ensure that the constraints or Postgresql types (e.g. ENUM)
are correctly created (and possibly dropped) along with the parent
table.
fixes #2919
Diffstat (limited to 'test/sql')
| -rw-r--r-- | test/sql/test_types.py | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/test/sql/test_types.py b/test/sql/test_types.py index e32126a18..288482392 100644 --- a/test/sql/test_types.py +++ b/test/sql/test_types.py @@ -1178,16 +1178,13 @@ class EnumTest(AssertsCompiledSQL, fixtures.TestBase): def __init__(self, name): self.name = name - class MyEnum(types.SchemaType, TypeDecorator): + class MyEnum(TypeDecorator): def __init__(self, values): self.impl = Enum( *[v.name for v in values], name="myenum", native_enum=False) - def _set_table(self, table, column): - self.impl._set_table(table, column) - # future method def process_literal_param(self, value, dialect): return value.name @@ -2007,12 +2004,9 @@ class BooleanTest( def __init__(self, value): self.value = value - class MyBool(types.SchemaType, TypeDecorator): + class MyBool(TypeDecorator): impl = Boolean() - def _set_table(self, table, column): - self.impl._set_table(table, column) - # future method def process_literal_param(self, value, dialect): return value.value |
