summaryrefslogtreecommitdiff
path: root/test/engine/test_reflection.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/engine/test_reflection.py')
-rw-r--r--test/engine/test_reflection.py23
1 files changed, 8 insertions, 15 deletions
diff --git a/test/engine/test_reflection.py b/test/engine/test_reflection.py
index 8a1d7b70e..a46c7372e 100644
--- a/test/engine/test_reflection.py
+++ b/test/engine/test_reflection.py
@@ -829,12 +829,12 @@ class ReflectionTest(fixtures.TestBase, ComparesTables):
e = engines.testing_engine(options={"poolclass": AssertionPool})
fn(e)
- @testing.uses_deprecated
+ @testing.uses_deprecated()
def test_reflect_uses_bind_constructor_conn(self):
self._test_reflect_uses_bind(lambda e: MetaData(e.connect(),
reflect=True))
- @testing.uses_deprecated
+ @testing.uses_deprecated()
def test_reflect_uses_bind_constructor_engine(self):
self._test_reflect_uses_bind(lambda e: MetaData(e, reflect=True))
@@ -1120,12 +1120,6 @@ class SchemaManipulationTest(fixtures.TestBase):
class UnicodeReflectionTest(fixtures.TestBase):
@classmethod
def setup_class(cls):
- # trigger mysql _server_casing check...
- testing.db.connect().close()
-
- cls.bind = bind = engines.utf8_engine(
- options={'convert_unicode': True})
-
cls.metadata = metadata = MetaData()
no_multibyte_period = set([
@@ -1152,7 +1146,7 @@ class UnicodeReflectionTest(fixtures.TestBase):
names = no_multibyte_period
# mysql can't handle casing usually
elif testing.against("mysql") and \
- not testing.requires._has_mysql_fully_case_sensitive():
+ not testing.requires.mysql_fully_case_sensitive.enabled:
names = no_multibyte_period.union(no_case_sensitivity)
# mssql + pyodbc + freetds can't compare multibyte names to
# information_schema.tables.table_name
@@ -1170,18 +1164,17 @@ class UnicodeReflectionTest(fixtures.TestBase):
)
schema.Index(ixname, t.c[cname])
- metadata.create_all(bind)
+ metadata.create_all(testing.db)
cls.names = names
@classmethod
def teardown_class(cls):
- cls.metadata.drop_all(cls.bind, checkfirst=False)
- cls.bind.dispose()
+ cls.metadata.drop_all(testing.db, checkfirst=False)
@testing.requires.unicode_connections
def test_has_table(self):
for tname, cname, ixname in self.names:
- assert self.bind.has_table(tname), "Can't detect name %s" % tname
+ assert testing.db.has_table(tname), "Can't detect name %s" % tname
@testing.requires.unicode_connections
def test_basic(self):
@@ -1190,7 +1183,7 @@ class UnicodeReflectionTest(fixtures.TestBase):
# (others?) expect non-unicode strings in result sets/bind
# params
- bind = self.bind
+ bind = testing.db
names = set([rec[0] for rec in self.names])
reflected = set(bind.table_names())
@@ -1217,7 +1210,7 @@ class UnicodeReflectionTest(fixtures.TestBase):
@testing.requires.unicode_connections
def test_get_names(self):
- inspector = inspect(self.bind)
+ inspector = inspect(testing.db)
names = dict(
(tname, (cname, ixname)) for tname, cname, ixname in self.names
)