Use oslotest instead of common test module

Module openstack.common.test is obsolete, so we should use
oslotest library instead of it.
Modified tests and common database code, new requirement added.

Change-Id: I853e548f11a4c3785eaf75124510a6d789536634
This commit is contained in:
Victor Sergeyev
2014-04-15 13:05:35 +03:00
committed by Doug Hellmann
parent a55dc72645
commit 486fac215a

View File

@@ -14,13 +14,13 @@
# under the License.
import mock
from oslotest import base as test_base
from testtools import matchers
from openstack.common import test
from openstack.common import versionutils
class DeprecatedTestCase(test.BaseTestCase):
class DeprecatedTestCase(test_base.BaseTestCase):
def assert_deprecated(self, mock_log, **expected_details):
decorator = versionutils.deprecated
if 'in_favor_of' in expected_details:
@@ -147,7 +147,7 @@ class DeprecatedTestCase(test.BaseTestCase):
remove_in='J')
class IsCompatibleTestCase(test.BaseTestCase):
class IsCompatibleTestCase(test_base.BaseTestCase):
def test_same_version(self):
self.assertTrue(versionutils.is_compatible('1', '1'))
self.assertTrue(versionutils.is_compatible('1.0', '1.0'))