summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAndrey Kurilin <akurilin@mirantis.com>2014-08-04 15:05:40 +0300
committerAndrey Kurilin <akurilin@mirantis.com>2014-08-11 17:33:52 +0300
commit6065b21b15b1b772cea281a99704c3c8d92c61cb (patch)
tree758aeaffcd77a09c20a6c98d69a93376b99fa64a /tests
parent3cb592775d063df9afdb65e0d59338b31363d089 (diff)
downloadoslo-db-6065b21b15b1b772cea281a99704c3c8d92c61cb.tar.gz
Move to oslo.utils
`oslo.db` uses several modules(`importutils` and `timeutils`) from `oslo-incubator`. This modules are already incubated and we should use them from `oslo.utils`. Change-Id: I09881ea3e115ca95bbd06ff5d1c0d5e253ed7640
Diffstat (limited to 'tests')
-rw-r--r--tests/test_api.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/test_api.py b/tests/test_api.py
index 98c618f..2168cd5 100644
--- a/tests/test_api.py
+++ b/tests/test_api.py
@@ -17,13 +17,15 @@
import mock
from oslo.config import cfg
+from oslo.utils import importutils
from oslo.db import api
from oslo.db import exception
-from oslo.db.openstack.common import importutils
from tests import utils as test_utils
-sqla = importutils.import_module('sqlalchemy')
+sqla = importutils.try_import('sqlalchemy')
+if not sqla:
+ raise ImportError("Unable to import module 'sqlalchemy'.")
def get_backend():