diff options
author | Jason Kirtland <jek@discorporate.us> | 2008-05-15 16:20:50 +0000 |
---|---|---|
committer | Jason Kirtland <jek@discorporate.us> | 2008-05-15 16:20:50 +0000 |
commit | f7cc199d37e1a428b0d62b545b73c7d6d2c898dc (patch) | |
tree | 1cb81f70ebfb6a5c9e06c6ed4592c7126368238d /test/sql/quote.py | |
parent | 590e74182f68a8932e8c4d2c4b53da28b316ffdf (diff) | |
download | sqlalchemy-f7cc199d37e1a428b0d62b545b73c7d6d2c898dc.tar.gz |
Don't blat Table.quote= when resolving foreign keys.
Diffstat (limited to 'test/sql/quote.py')
-rw-r--r-- | test/sql/quote.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/sql/quote.py b/test/sql/quote.py index 7003ce834..6f474ba60 100644 --- a/test/sql/quote.py +++ b/test/sql/quote.py @@ -85,6 +85,21 @@ class QuoteTest(TestBase, AssertsCompiledSQL): Column('ColumnOne', Integer, quote=False), quote=False, schema="FooBar", quote_schema=False) self.assert_compile(t1.select(), '''SELECT FooBar.TableOne.ColumnOne FROM FooBar.TableOne''') + def test_table_quote_flag(self): + metadata = MetaData() + t1 = Table('TableOne', metadata, + Column('id', Integer), + quote=False) + t2 = Table('TableTwo', metadata, + Column('id', Integer), + Column('t1_id', Integer, ForeignKey('TableOne.id')), + quote=False) + + self.assert_compile( + t2.join(t1).select(), + "SELECT TableTwo.id, TableTwo.t1_id, TableOne.id " + "FROM TableTwo JOIN TableOne ON TableOne.id = TableTwo.t1_id") + @testing.crashes('oracle', 'FIXME: unknown, verify not fails_on') @testing.requires.subqueries def testlabels(self): |