Merge "Unit tests: Remove deprecated oslo_db test case classes"

This commit is contained in:
Zuul 2017-10-23 15:10:49 +00:00 committed by Gerrit Code Review
commit 7bb3587be1

View File

@ -26,11 +26,13 @@ import os
import uuid import uuid
from migrate.versioning import repository from migrate.versioning import repository
from oslo_db.sqlalchemy import test_base from oslo_db.sqlalchemy import enginefacade
from oslo_db.sqlalchemy import test_fixtures
from oslo_db.sqlalchemy import test_migrations from oslo_db.sqlalchemy import test_migrations
from oslo_db.sqlalchemy import utils from oslo_db.sqlalchemy import utils
from oslo_serialization import jsonutils from oslo_serialization import jsonutils
from oslo_utils import timeutils from oslo_utils import timeutils
from oslotest import base as test_base
import six import six
import sqlalchemy import sqlalchemy
import testtools import testtools
@ -738,18 +740,24 @@ class HeatMigrationsCheckers(test_migrations.WalkVersionsMixin,
'attr_data_id') 'attr_data_id')
class TestHeatMigrationsMySQL(HeatMigrationsCheckers, class DbTestCase(test_fixtures.OpportunisticDBTestMixin,
test_base.MySQLOpportunisticTestCase): test_base.BaseTestCase):
pass def setUp(self):
super(DbTestCase, self).setUp()
self.engine = enginefacade.writer.get_engine()
self.sessionmaker = enginefacade.writer.get_sessionmaker()
class TestHeatMigrationsPostgreSQL(HeatMigrationsCheckers, class TestHeatMigrationsMySQL(DbTestCase, HeatMigrationsCheckers):
test_base.PostgreSQLOpportunisticTestCase): FIXTURE = test_fixtures.MySQLOpportunisticFixture
pass
class TestHeatMigrationsSQLite(HeatMigrationsCheckers, class TestHeatMigrationsPostgreSQL(DbTestCase, HeatMigrationsCheckers):
test_base.DbTestCase): FIXTURE = test_fixtures.PostgresqlOpportunisticFixture
class TestHeatMigrationsSQLite(DbTestCase, HeatMigrationsCheckers):
pass pass
@ -770,19 +778,19 @@ class ModelsMigrationSyncMixin(object):
return True return True
class ModelsMigrationsSyncMysql(ModelsMigrationSyncMixin, class ModelsMigrationsSyncMysql(DbTestCase,
test_migrations.ModelsMigrationsSync, ModelsMigrationSyncMixin,
test_base.MySQLOpportunisticTestCase): test_migrations.ModelsMigrationsSync):
pass FIXTURE = test_fixtures.MySQLOpportunisticFixture
class ModelsMigrationsSyncPostgres(ModelsMigrationSyncMixin, class ModelsMigrationsSyncPostgres(DbTestCase,
test_migrations.ModelsMigrationsSync, ModelsMigrationSyncMixin,
test_base.PostgreSQLOpportunisticTestCase): test_migrations.ModelsMigrationsSync):
pass FIXTURE = test_fixtures.PostgresqlOpportunisticFixture
class ModelsMigrationsSyncSQLite(ModelsMigrationSyncMixin, class ModelsMigrationsSyncSQLite(DbTestCase,
test_migrations.ModelsMigrationsSync, ModelsMigrationSyncMixin,
test_base.DbTestCase): test_migrations.ModelsMigrationsSync):
pass pass