summaryrefslogtreecommitdiff
path: root/test/dialect/test_postgresql.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2011-09-09 17:12:52 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2011-09-09 17:12:52 -0400
commit843847740c7fd3705cb7804ac62914b9a77dc174 (patch)
tree7758987cac6ffa3aef1bcd9ad8899bdb29561060 /test/dialect/test_postgresql.py
parentbb978f2e0a4c455b28825aed3fcc80bf70f09c49 (diff)
downloadsqlalchemy-843847740c7fd3705cb7804ac62914b9a77dc174.tar.gz
- Reflection functions for Table, Sequence no longer
case insensitive. Names can be differ only in case and will be correctly distinguished. [ticket:2256]
Diffstat (limited to 'test/dialect/test_postgresql.py')
-rw-r--r--test/dialect/test_postgresql.py27
1 files changed, 27 insertions, 0 deletions
diff --git a/test/dialect/test_postgresql.py b/test/dialect/test_postgresql.py
index a8b998c71..adf292999 100644
--- a/test/dialect/test_postgresql.py
+++ b/test/dialect/test_postgresql.py
@@ -1360,6 +1360,33 @@ class ReflectionTest(fixtures.TestBase):
== referer.c.ref).compare(
subject.join(referer).onclause))
+ @testing.provide_metadata
+ def test_uppercase_lowercase_table(self):
+ metadata = self.metadata
+
+ a_table = Table('a', metadata, Column('x', Integer))
+ A_table = Table('A', metadata, Column('x', Integer))
+
+ a_table.create()
+ assert testing.db.has_table("a")
+ assert not testing.db.has_table("A")
+ A_table.create(checkfirst=True)
+ assert testing.db.has_table("A")
+
+ def test_uppercase_lowercase_sequence(self):
+
+ a_seq = Sequence('a')
+ A_seq = Sequence('A')
+
+ a_seq.create(testing.db)
+ assert testing.db.dialect.has_sequence(testing.db, "a")
+ assert not testing.db.dialect.has_sequence(testing.db, "A")
+ A_seq.create(testing.db, checkfirst=True)
+ assert testing.db.dialect.has_sequence(testing.db, "A")
+
+ a_seq.drop(testing.db)
+ A_seq.drop(testing.db)
+
def test_schema_reflection_multi_search_path(self):
"""test the 'set the same schema' rule when
multiple schemas/search paths are in effect."""