summaryrefslogtreecommitdiff
path: root/test/sql/quote.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2007-01-29 22:41:53 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2007-01-29 22:41:53 +0000
commitac4b2a8d18c026bb5fa3efd82b59cba6ed89bd75 (patch)
tree4eeb96d38a64f425c72b82a112ef742588b745e2 /test/sql/quote.py
parentd0fd16baa30e972e32fde6561ff9c4bd0bd2bd3d (diff)
downloadsqlalchemy-ac4b2a8d18c026bb5fa3efd82b59cba6ed89bd75.tar.gz
fixes to quoting on "fake" column when used off its table
Diffstat (limited to 'test/sql/quote.py')
-rw-r--r--test/sql/quote.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/sql/quote.py b/test/sql/quote.py
index 8ae228031..607a595d3 100644
--- a/test/sql/quote.py
+++ b/test/sql/quote.py
@@ -96,6 +96,10 @@ class QuoteTest(PersistTest):
Column("col1", Integer))
x = select([table.c.col1.label("ImATable_col1")]).alias("SomeAlias")
assert str(select([x.c.ImATable_col1])) == '''SELECT "SomeAlias"."ImATable_col1" \nFROM (SELECT "ImATable".col1 AS "ImATable_col1" \nFROM "ImATable") AS "SomeAlias"'''
+
+ x = select([sql.column("'foo'").label("somelabel")], from_obj=[table]).alias("AnAlias")
+ x = x.select()
+ assert str(x) == '''SELECT "AnAlias".somelabel \nFROM (SELECT 'foo' AS somelabel \nFROM "ImATable") AS "AnAlias"'''
def testlabelsnocase(self):
metadata = MetaData()