#NEWLINE# def test_mysql_opportunistically( self ) : #NEWLINE# #INDENT# self . useFixture ( fixtures . LockFixture ( 'mysql' ) ) #NEWLINE# if ( not db_test_utils . is_backend_avail ( 'mysql' ) ) : #NEWLINE# #INDENT# raise self . skipTest ( 'mysql is not available' ) #NEWLINE# #UNINDENT# self . useFixture ( fixtures . MySQLConfFixture ( ) ) #NEWLINE# connect_string = db_test_utils . get_connect_string ( 'mysql' ) #NEWLINE# engine = sqlalchemy . create_engine ( connect_string ) #NEWLINE# self . engines [ 'mysqlcitest' ] = engine #NEWLINE# self . test_databases [ 'mysqlcitest' ] = connect_string #NEWLINE# self . _walk_versions ( engine ) #NEWLINE# connection = engine . connect ( ) #NEWLINE# total = connection . execute ( "SELECT count(*) from information_schema.TABLES where TABLE_SCHEMA='openstack_citest'" ) #NEWLINE# self . assertTrue ( ( total . scalar ( ) > 0 ) , 'No tables found. Wrong schema?' ) #NEWLINE# noninnodb = connection . execute ( "SELECT count(*) from information_schema.TABLES where TABLE_SCHEMA='openstack_citest' and ENGINE!='InnoDB' and TABLE_NAME!='alembic_version'" ) #NEWLINE# count = noninnodb . scalar ( ) #NEWLINE# self . assertEqual ( count , 0 , ( '%d non InnoDB tables created' % total ) ) #NEWLINE# connection . close ( )