From: Mike Bayer Date: Tue, 3 Nov 2009 19:48:07 +0000 (+0000) Subject: - simplify default schema name test X-Git-Tag: rel_0_6beta1~189 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6acbb4fb93eb556de88847f8acc38c9bbf86fb2f;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git - simplify default schema name test - MySQL + zxjdbc *is* unicode by default. it was the broken initialize() --- diff --git a/test/engine/test_reflection.py b/test/engine/test_reflection.py index c2b2cc9cb1..8ae75ad9c4 100644 --- a/test/engine/test_reflection.py +++ b/test/engine/test_reflection.py @@ -837,18 +837,16 @@ class SchemaTest(TestBase): def test_explicit_default_schema(self): engine = testing.db - if testing.against('mysql+mysqldb'): - schema = testing.db.url.database - elif testing.against('postgresql'): - schema = 'public' - elif testing.against('sqlite'): + if testing.against('sqlite'): # Works for CREATE TABLE main.foo, SELECT FROM main.foo, etc., # but fails on: # FOREIGN KEY(col2) REFERENCES main.table1 (col1) schema = 'main' else: - schema = engine.dialect.get_default_schema_name(engine.connect()) + schema = engine.dialect.default_schema_name + assert bool(schema) + metadata = MetaData(engine) table1 = Table('table1', metadata, Column('col1', sa.Integer, primary_key=True), diff --git a/test/sql/test_types.py b/test/sql/test_types.py index 2750d58798..100ff8b782 100644 --- a/test/sql/test_types.py +++ b/test/sql/test_types.py @@ -263,7 +263,7 @@ class UnicodeTest(TestBase, AssertsExecutionResults): ('postgresql','psycopg2'), ('postgresql','pg8000'), ('postgresql','zxjdbc'), - #('mysql','zxjdbc'), # no unicode for MySQL + ('mysql','zxjdbc'), ('sqlite','pysqlite'), )), \ "name: %s driver %s returns_unicode_strings=%s" % \