summaryrefslogtreecommitdiff
path: root/test/sql/quote.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2006-08-31 23:13:14 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2006-08-31 23:13:14 +0000
commite168ef63a9a1306232b4a3c87d6264f2263c9e15 (patch)
treebb7ff4ac775c2dfbfc4d860ac9cf4aff891c50d0 /test/sql/quote.py
parent0c7250a4740b26875d94fc9a1cb714fc970ea700 (diff)
downloadsqlalchemy-e168ef63a9a1306232b4a3c87d6264f2263c9e15.tar.gz
some tweaks to oracle casing...
Diffstat (limited to 'test/sql/quote.py')
-rw-r--r--test/sql/quote.py34
1 files changed, 17 insertions, 17 deletions
diff --git a/test/sql/quote.py b/test/sql/quote.py
index 02a501003..2d5132fb0 100644
--- a/test/sql/quote.py
+++ b/test/sql/quote.py
@@ -13,10 +13,10 @@ class QuoteTest(PersistTest):
Column('lowercase', Integer, primary_key=True),
Column('UPPERCASE', Integer),
Column('MixedCase', Integer),
- Column('ASC', Integer))
+ Column('ASC', Integer, key='a123'))
table2 = Table('WorstCase2', metadata,
- Column('desc', Integer, primary_key=True),
- Column('Union', Integer),
+ Column('desc', Integer, primary_key=True, key='d123'),
+ Column('Union', Integer, key='u123'),
Column('MixedCase', Integer))
table1.create()
table2.create()
@@ -30,12 +30,12 @@ class QuoteTest(PersistTest):
table2.drop()
def testbasic(self):
- table1.insert().execute({'lowercase':1,'UPPERCASE':2,'MixedCase':3,'ASC':4},
- {'lowercase':2,'UPPERCASE':2,'MixedCase':3,'ASC':4},
- {'lowercase':4,'UPPERCASE':3,'MixedCase':2,'ASC':1})
- table2.insert().execute({'desc':1,'Union':2,'MixedCase':3},
- {'desc':2,'Union':2,'MixedCase':3},
- {'desc':4,'Union':3,'MixedCase':2})
+ table1.insert().execute({'lowercase':1,'UPPERCASE':2,'MixedCase':3,'a123':4},
+ {'lowercase':2,'UPPERCASE':2,'MixedCase':3,'a123':4},
+ {'lowercase':4,'UPPERCASE':3,'MixedCase':2,'a123':1})
+ table2.insert().execute({'d123':1,'u123':2,'MixedCase':3},
+ {'d123':2,'u123':2,'MixedCase':3},
+ {'d123':4,'u123':3,'MixedCase':2})
res1 = select([table1.c.lowercase, table1.c.UPPERCASE, table1.c.MixedCase, table1.c.ASC]).execute().fetchall()
print res1
@@ -51,18 +51,18 @@ class QuoteTest(PersistTest):
assert t2.c.has_key('MixedCase')
def testlabels(self):
- table1.insert().execute({'lowercase':1,'UPPERCASE':2,'MixedCase':3,'ASC':4},
- {'lowercase':2,'UPPERCASE':2,'MixedCase':3,'ASC':4},
- {'lowercase':4,'UPPERCASE':3,'MixedCase':2,'ASC':1})
- table2.insert().execute({'desc':1,'Union':2,'MixedCase':3},
- {'desc':2,'Union':2,'MixedCase':3},
- {'desc':4,'Union':3,'MixedCase':2})
+ table1.insert().execute({'lowercase':1,'UPPERCASE':2,'MixedCase':3,'a123':4},
+ {'lowercase':2,'UPPERCASE':2,'MixedCase':3,'a123':4},
+ {'lowercase':4,'UPPERCASE':3,'MixedCase':2,'a123':1})
+ table2.insert().execute({'d123':1,'u123':2,'MixedCase':3},
+ {'d123':2,'u123':2,'MixedCase':3},
+ {'d123':4,'u123':3,'MixedCase':2})
- res1 = select([table1.c.lowercase, table1.c.UPPERCASE, table1.c.MixedCase, table1.c.ASC], use_labels=True).execute().fetchall()
+ res1 = select([table1.c.lowercase, table1.c.UPPERCASE, table1.c.MixedCase, table1.c.a123], use_labels=True).execute().fetchall()
print res1
assert(res1==[(1,2,3,4),(2,2,3,4),(4,3,2,1)])
- res2 = select([table2.c.desc, table2.c.Union, table2.c.MixedCase], use_labels=True).execute().fetchall()
+ res2 = select([table2.c.d123, table2.c.u123, table2.c.MixedCase], use_labels=True).execute().fetchall()
print res2
assert(res2==[(1,2,3),(2,2,3),(4,3,2)])