eq_(t1.name, "SomeTable")
assert t1.c.x is not None
- @testing.fails_on('mysql', 'FKs come back as lower case no matter what')
+ @testing.fails_if(lambda: not testing.requires._has_mysql_fully_case_sensitive())
def test_reflect_via_fk(self):
m = MetaData()
t2 = Table("SomeOtherTable", m, autoload=True, autoload_with=testing.db)
eq_(t2.name, "SomeOtherTable")
assert "SomeTable" in m.tables
+ @testing.fails_if(testing.requires._has_mysql_fully_case_sensitive)
@testing.fails_on_everything_except('sqlite', 'mysql')
def test_reflect_case_insensitive(self):
m = MetaData()
return False
def _has_mysql_on_windows():
- return testing.against('mysql+mysqldb') and \
+ return testing.against('mysql') and \
testing.db.dialect._server_casing == 1
+def _has_mysql_fully_case_sensitive():
+ return testing.against('mysql') and \
+ testing.db.dialect._server_casing == 0
+
def sqlite(fn):
return _chain_decorators_on(
fn,