diff options
| author | Jim Phares <jim.phares@pcusa.org> | 2011-03-15 16:56:45 -0400 |
|---|---|---|
| committer | Jim Phares <jim.phares@pcusa.org> | 2011-03-15 16:56:45 -0400 |
| commit | fde2a7f8fe5fd16891ddff99511e2ed3c8eb9ab6 (patch) | |
| tree | 211988f48bd76a2f9b83f4599fded85a1dc7676a /test/sql/test_quote.py | |
| parent | c594b58f0b8cf72d49cc6bf748b5e4851a1f9c2c (diff) | |
| download | sqlalchemy-fde2a7f8fe5fd16891ddff99511e2ed3c8eb9ab6.tar.gz | |
Informix and postgresql reserved words changes -- almost done.
Diffstat (limited to 'test/sql/test_quote.py')
| -rw-r--r-- | test/sql/test_quote.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/sql/test_quote.py b/test/sql/test_quote.py index 50adad751..b31e7dfb4 100644 --- a/test/sql/test_quote.py +++ b/test/sql/test_quote.py @@ -169,6 +169,18 @@ class QuoteTest(TestBase, AssertsCompiledSQL): self.assert_compile(x, '''SELECT "SomeLabel" FROM (SELECT 'FooCol' AS "SomeLabel" FROM "ImATable")''') + def test_reserved_words(self): + metadata = MetaData() + table = Table("ImATable", metadata, + Column("col1", Integer), + Column("from", Integer, key="morf"), + Column("louisville", Integer), + Column("order", Integer)) + x = select([table.c.col1, table.c.morf, table.c.louisville, table.c.order]) + + self.assert_compile(x, + '''SELECT "ImATable".col1, "ImATable"."from", "ImATable".louisville, "ImATable"."order" FROM "ImATable"''') + class PreparerTest(TestBase): """Test the db-agnostic quoting services of IdentifierPreparer.""" |
