Move db tests base.py to common code

tests/unit/db/sqlalchemy/base.py moved to
openstack/common/db/sqlalchemy/test_base.py for further reuse in other
projects.

Change-Id: I5cf83a63f148f48ff7c38a1ad4cc714f08e60fd1
This commit is contained in:
Ilya Pekelny 2013-12-16 17:36:30 +02:00
parent 3728fbf0ae
commit c300b9267b
5 changed files with 7 additions and 7 deletions

View File

@ -23,7 +23,7 @@ import six
from openstack.common.db.sqlalchemy import session
from openstack.common.db.sqlalchemy import utils
from tests import utils as test_utils
from openstack.common import test
class DbFixture(fixtures.Fixture):
@ -52,7 +52,7 @@ class DbFixture(fixtures.Fixture):
self.addCleanup(self.conf.reset)
class DbTestCase(test_utils.BaseTestCase):
class DbTestCase(test.BaseTestCase):
"""Base class for testing of DB code.
Using `DbFixture`. Intended to be the main database test case to use all

View File

@ -19,7 +19,7 @@ import sqlalchemy as sa
from openstack.common.db.sqlalchemy import migration
from openstack.common.db.sqlalchemy import session
from tests.unit.db.sqlalchemy import base as test_base
from openstack.common.db.sqlalchemy import test_base
def uniques(*constraints):

View File

@ -26,10 +26,10 @@ import sqlalchemy
from openstack.common.db import exception as db_exception
from openstack.common.db.sqlalchemy import migration
from openstack.common.db.sqlalchemy import session as db_session
from tests.unit.db.sqlalchemy import base
from openstack.common.db.sqlalchemy import test_base
class TestMigrationCommon(base.DbTestCase):
class TestMigrationCommon(test_base.DbTestCase):
def setUp(self):
super(TestMigrationCommon, self).setUp()

View File

@ -18,8 +18,8 @@ from sqlalchemy import Integer, String
from sqlalchemy.ext.declarative import declarative_base
from openstack.common.db.sqlalchemy import models
from openstack.common.db.sqlalchemy import test_base
from openstack.common import test
from tests.unit.db.sqlalchemy import base as test_base
BASE = declarative_base()

View File

@ -28,9 +28,9 @@ from sqlalchemy.ext.declarative import declarative_base
from openstack.common.db import exception as db_exc
from openstack.common.db.sqlalchemy import models
from openstack.common.db.sqlalchemy import session
from openstack.common.db.sqlalchemy import test_base
from openstack.common.fixture import config
from openstack.common import test
from tests.unit.db.sqlalchemy import base as test_base
BASE = declarative_base()