diff options
author | Jason Kirtland <jek@discorporate.us> | 2007-10-04 18:31:31 +0000 |
---|---|---|
committer | Jason Kirtland <jek@discorporate.us> | 2007-10-04 18:31:31 +0000 |
commit | 6fb5f1047c00a81bd80406d6989aa55e7060b107 (patch) | |
tree | 49a22d2822d9051cfc819b2ffd5947d7d2313ddb | |
parent | d154266a652f0486fbf004ceb6e0223d6f3e0997 (diff) | |
download | sqlalchemy-6fb5f1047c00a81bd80406d6989aa55e7060b107.tar.gz |
Adjusted reserved word reflection test for oracle-style identifier dialects. But probably the CheckConstraint part of this test should just be removed, as it's testing a non-extant feature.
-rw-r--r-- | test/engine/reflection.py | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/test/engine/reflection.py b/test/engine/reflection.py index d271ba25f..4b7b2f72f 100644 --- a/test/engine/reflection.py +++ b/test/engine/reflection.py @@ -515,23 +515,19 @@ class ReflectionTest(PersistTest): UniqueConstraint('from', name='when')) Index('where', table_a.c['from']) - if testbase.db.engine.name == 'firebird': - # Firebird doesn't like creating the constraint with 'true' column - # quoted, when this column was created without quotes - # it will work with one of these 2 syntaxes: - # - # CONSTRAINT limit CHECK (true <> 1) - # CONSTRAINT limit CHECK ('TRUE' <> 1) - # - # for now, I'll use the 1st option - quoter = lambda x: x + # There's currently no way to calculate identifier case normalization + # in isolation, so... + if testbase.db.engine.name in ('firebird', 'oracle'): + check_col = 'TRUE' else: - quoter = meta.bind.dialect.identifier_preparer.quote_identifier + check_col = 'true' + quoter = meta.bind.dialect.identifier_preparer.quote_identifier table_b = Table('false', meta, Column('create', Integer, primary_key=True), Column('true', Integer, ForeignKey('select.not')), - CheckConstraint('%s <> 1' % quoter('true'), name='limit')) + CheckConstraint('%s <> 1' % quoter(check_col), + name='limit')) table_c = Table('is', meta, Column('or', Integer, nullable=False, primary_key=True), |