def setUp(self):
        itau_data = get_itau_data_from_file()
        self.header_arquivo = itau_data['header_arquivo']
        self.seg_p = itau_data['seg_p1']
        self.seg_p_str = itau_data['seg_p1_str']
        self.seg_q = itau_data['seg_q1']
        self.seg_q_str = itau_data['seg_q1_str']
def _db_schema_sanity_check(engine):
    """Ensure all database tables were created with required parameters.

    :param engine:  SQLAlchemy engine instance for a given database

    """

    if engine.name == 'mysql':
        onlyutf8_sql = ('SELECT TABLE_NAME,TABLE_COLLATION '
                        'from information_schema.TABLES '
                        'where TABLE_SCHEMA=%s and '
                        'TABLE_COLLATION NOT LIKE "%%utf8%%"')

        table_names = [res[0] for res in engine.execute(onlyutf8_sql,
                                                        engine.url.database)]
        if len(table_names) > 0:
            raise ValueError(_('Tables "%s" have non utf8 collation, '
                               'please make sure all tables are CHARSET=utf8'
                               ) % ','.join(table_names))