summaryrefslogtreecommitdiff
path: root/ironic
diff options
context:
space:
mode:
Diffstat (limited to 'ironic')
-rw-r--r--ironic/tests/__init__.py34
-rw-r--r--ironic/tests/functional/__init__.py (renamed from ironic/tests/api/__init__.py)0
-rw-r--r--ironic/tests/unit/__init__.py34
-rw-r--r--ironic/tests/unit/api/__init__.py (renamed from ironic/tests/api/v1/__init__.py)0
-rw-r--r--ironic/tests/unit/api/base.py (renamed from ironic/tests/api/base.py)2
-rw-r--r--ironic/tests/unit/api/test_acl.py (renamed from ironic/tests/api/test_acl.py)6
-rw-r--r--ironic/tests/unit/api/test_base.py (renamed from ironic/tests/api/test_base.py)2
-rw-r--r--ironic/tests/unit/api/test_hooks.py (renamed from ironic/tests/api/test_hooks.py)4
-rw-r--r--ironic/tests/unit/api/test_root.py (renamed from ironic/tests/api/test_root.py)2
-rw-r--r--ironic/tests/unit/api/utils.py (renamed from ironic/tests/api/utils.py)2
-rw-r--r--ironic/tests/unit/api/v1/__init__.py (renamed from ironic/tests/cmd/__init__.py)0
-rw-r--r--ironic/tests/unit/api/v1/test_chassis.py (renamed from ironic/tests/api/v1/test_chassis.py)8
-rw-r--r--ironic/tests/unit/api/v1/test_drivers.py (renamed from ironic/tests/api/v1/test_drivers.py)2
-rw-r--r--ironic/tests/unit/api/v1/test_nodes.py (renamed from ironic/tests/api/v1/test_nodes.py)8
-rw-r--r--ironic/tests/unit/api/v1/test_ports.py (renamed from ironic/tests/api/v1/test_ports.py)10
-rw-r--r--ironic/tests/unit/api/v1/test_root.py (renamed from ironic/tests/api/v1/test_root.py)4
-rw-r--r--ironic/tests/unit/api/v1/test_types.py (renamed from ironic/tests/api/v1/test_types.py)2
-rw-r--r--ironic/tests/unit/api/v1/test_utils.py (renamed from ironic/tests/api/v1/test_utils.py)4
-rw-r--r--ironic/tests/unit/api/v1/test_versions.py (renamed from ironic/tests/api/v1/test_versions.py)2
-rw-r--r--ironic/tests/unit/base.py (renamed from ironic/tests/base.py)4
-rw-r--r--ironic/tests/unit/cmd/__init__.py (renamed from ironic/tests/common/__init__.py)0
-rw-r--r--ironic/tests/unit/cmd/test_dbsync.py (renamed from ironic/tests/cmd/test_dbsync.py)2
-rw-r--r--ironic/tests/unit/common/__init__.py (renamed from ironic/tests/conductor/__init__.py)0
-rw-r--r--ironic/tests/unit/common/test_disk_partitioner.py (renamed from ironic/tests/common/test_disk_partitioner.py)2
-rw-r--r--ironic/tests/unit/common/test_driver_factory.py (renamed from ironic/tests/common/test_driver_factory.py)2
-rw-r--r--ironic/tests/unit/common/test_exception.py (renamed from ironic/tests/common/test_exception.py)2
-rw-r--r--ironic/tests/unit/common/test_fsm.py (renamed from ironic/tests/common/test_fsm.py)2
-rw-r--r--ironic/tests/unit/common/test_glance_service.py (renamed from ironic/tests/common/test_glance_service.py)4
-rw-r--r--ironic/tests/unit/common/test_hash_ring.py (renamed from ironic/tests/common/test_hash_ring.py)4
-rw-r--r--ironic/tests/unit/common/test_image_service.py (renamed from ironic/tests/common/test_image_service.py)2
-rw-r--r--ironic/tests/unit/common/test_images.py (renamed from ironic/tests/common/test_images.py)2
-rw-r--r--ironic/tests/unit/common/test_keystone.py (renamed from ironic/tests/common/test_keystone.py)2
-rw-r--r--ironic/tests/unit/common/test_network.py (renamed from ironic/tests/common/test_network.py)8
-rw-r--r--ironic/tests/unit/common/test_policy.py (renamed from ironic/tests/common/test_policy.py)2
-rw-r--r--ironic/tests/unit/common/test_pxe_utils.py (renamed from ironic/tests/common/test_pxe_utils.py)20
-rw-r--r--ironic/tests/unit/common/test_raid.py (renamed from ironic/tests/common/test_raid.py)8
-rw-r--r--ironic/tests/unit/common/test_states.py (renamed from ironic/tests/common/test_states.py)2
-rw-r--r--ironic/tests/unit/common/test_swift.py (renamed from ironic/tests/common/test_swift.py)2
-rw-r--r--ironic/tests/unit/common/test_utils.py (renamed from ironic/tests/common/test_utils.py)2
-rw-r--r--ironic/tests/unit/conductor/__init__.py (renamed from ironic/tests/db/sqlalchemy/__init__.py)0
-rw-r--r--ironic/tests/unit/conductor/test_conductor_utils.py (renamed from ironic/tests/conductor/test_conductor_utils.py)10
-rw-r--r--ironic/tests/unit/conductor/test_manager.py (renamed from ironic/tests/conductor/test_manager.py)14
-rw-r--r--ironic/tests/unit/conductor/test_rpcapi.py (renamed from ironic/tests/conductor/test_rpcapi.py)6
-rw-r--r--ironic/tests/unit/conductor/test_task_manager.py (renamed from ironic/tests/conductor/test_task_manager.py)6
-rw-r--r--ironic/tests/unit/conductor/test_utils.py (renamed from ironic/tests/conductor/test_utils.py)4
-rw-r--r--ironic/tests/unit/conductor/utils.py (renamed from ironic/tests/conductor/utils.py)0
-rw-r--r--ironic/tests/unit/conf_fixture.py (renamed from ironic/tests/conf_fixture.py)0
-rw-r--r--ironic/tests/unit/db/__init__.py (renamed from ironic/tests/db/__init__.py)2
-rw-r--r--ironic/tests/unit/db/base.py (renamed from ironic/tests/db/base.py)2
-rw-r--r--ironic/tests/unit/db/sqlalchemy/__init__.py (renamed from ironic/tests/dhcp/__init__.py)0
-rw-r--r--ironic/tests/unit/db/sqlalchemy/test_migrations.py (renamed from ironic/tests/db/sqlalchemy/test_migrations.py)2
-rw-r--r--ironic/tests/unit/db/sqlalchemy/test_types.py (renamed from ironic/tests/db/sqlalchemy/test_types.py)2
-rw-r--r--ironic/tests/unit/db/test_chassis.py (renamed from ironic/tests/db/test_chassis.py)4
-rw-r--r--ironic/tests/unit/db/test_conductor.py (renamed from ironic/tests/db/test_conductor.py)4
-rw-r--r--ironic/tests/unit/db/test_nodes.py (renamed from ironic/tests/db/test_nodes.py)4
-rw-r--r--ironic/tests/unit/db/test_ports.py (renamed from ironic/tests/db/test_ports.py)4
-rw-r--r--ironic/tests/unit/db/utils.py (renamed from ironic/tests/db/utils.py)0
-rw-r--r--ironic/tests/unit/dhcp/__init__.py (renamed from ironic/tests/drivers/amt/__init__.py)0
-rw-r--r--ironic/tests/unit/dhcp/test_factory.py (renamed from ironic/tests/dhcp/test_factory.py)2
-rw-r--r--ironic/tests/unit/dhcp/test_neutron.py (renamed from ironic/tests/dhcp/test_neutron.py)6
-rw-r--r--ironic/tests/unit/drivers/__init__.py (renamed from ironic/tests/drivers/__init__.py)2
-rw-r--r--ironic/tests/unit/drivers/agent_pxe_config.template (renamed from ironic/tests/drivers/agent_pxe_config.template)0
-rw-r--r--ironic/tests/unit/drivers/amt/__init__.py (renamed from ironic/tests/drivers/cimc/__init__.py)0
-rw-r--r--ironic/tests/unit/drivers/amt/test_common.py (renamed from ironic/tests/drivers/amt/test_common.py)13
-rw-r--r--ironic/tests/unit/drivers/amt/test_management.py (renamed from ironic/tests/drivers/amt/test_management.py)13
-rw-r--r--ironic/tests/unit/drivers/amt/test_power.py (renamed from ironic/tests/drivers/amt/test_power.py)10
-rw-r--r--ironic/tests/unit/drivers/amt/test_vendor.py (renamed from ironic/tests/drivers/amt/test_vendor.py)8
-rw-r--r--ironic/tests/unit/drivers/cimc/__init__.py (renamed from ironic/tests/drivers/drac/__init__.py)0
-rw-r--r--ironic/tests/unit/drivers/cimc/test_common.py (renamed from ironic/tests/drivers/cimc/test_common.py)8
-rw-r--r--ironic/tests/unit/drivers/cimc/test_management.py (renamed from ironic/tests/drivers/cimc/test_management.py)2
-rw-r--r--ironic/tests/unit/drivers/cimc/test_power.py (renamed from ironic/tests/drivers/cimc/test_power.py)2
-rw-r--r--ironic/tests/unit/drivers/drac/__init__.py (renamed from ironic/tests/drivers/ilo/__init__.py)0
-rw-r--r--ironic/tests/unit/drivers/drac/bios_wsman_mock.py (renamed from ironic/tests/drivers/drac/bios_wsman_mock.py)0
-rw-r--r--ironic/tests/unit/drivers/drac/test_bios.py (renamed from ironic/tests/drivers/drac/test_bios.py)12
-rw-r--r--ironic/tests/unit/drivers/drac/test_client.py (renamed from ironic/tests/drivers/drac/test_client.py)9
-rw-r--r--ironic/tests/unit/drivers/drac/test_common.py (renamed from ironic/tests/drivers/drac/test_common.py)6
-rw-r--r--ironic/tests/unit/drivers/drac/test_management.py (renamed from ironic/tests/drivers/drac/test_management.py)13
-rw-r--r--ironic/tests/unit/drivers/drac/test_power.py (renamed from ironic/tests/drivers/drac/test_power.py)11
-rw-r--r--ironic/tests/unit/drivers/drac/utils.py (renamed from ironic/tests/drivers/drac/utils.py)0
-rw-r--r--ironic/tests/unit/drivers/elilo_efi_pxe_config.template (renamed from ironic/tests/drivers/elilo_efi_pxe_config.template)0
-rw-r--r--ironic/tests/unit/drivers/ilo/__init__.py (renamed from ironic/tests/drivers/irmc/__init__.py)0
-rw-r--r--ironic/tests/unit/drivers/ilo/test_common.py (renamed from ironic/tests/drivers/ilo/test_common.py)8
-rw-r--r--ironic/tests/unit/drivers/ilo/test_deploy.py (renamed from ironic/tests/drivers/ilo/test_deploy.py)8
-rw-r--r--ironic/tests/unit/drivers/ilo/test_inspect.py (renamed from ironic/tests/drivers/ilo/test_inspect.py)8
-rw-r--r--ironic/tests/unit/drivers/ilo/test_management.py (renamed from ironic/tests/drivers/ilo/test_management.py)8
-rw-r--r--ironic/tests/unit/drivers/ilo/test_power.py (renamed from ironic/tests/drivers/ilo/test_power.py)8
-rw-r--r--ironic/tests/unit/drivers/ipxe_config.template (renamed from ironic/tests/drivers/ipxe_config.template)0
-rw-r--r--ironic/tests/unit/drivers/irmc/__init__.py (renamed from ironic/tests/drivers/msftocs/__init__.py)0
-rw-r--r--ironic/tests/unit/drivers/irmc/fake_sensors_data_ng.xml (renamed from ironic/tests/drivers/irmc/fake_sensors_data_ng.xml)0
-rw-r--r--ironic/tests/unit/drivers/irmc/fake_sensors_data_ok.xml (renamed from ironic/tests/drivers/irmc/fake_sensors_data_ok.xml)0
-rw-r--r--ironic/tests/unit/drivers/irmc/test_common.py (renamed from ironic/tests/drivers/irmc/test_common.py)11
-rw-r--r--ironic/tests/unit/drivers/irmc/test_deploy.py (renamed from ironic/tests/drivers/irmc/test_deploy.py)8
-rw-r--r--ironic/tests/unit/drivers/irmc/test_management.py (renamed from ironic/tests/drivers/irmc/test_management.py)11
-rw-r--r--ironic/tests/unit/drivers/irmc/test_power.py (renamed from ironic/tests/drivers/irmc/test_power.py)8
-rw-r--r--ironic/tests/unit/drivers/msftocs/__init__.py (renamed from ironic/tests/drivers/ucs/__init__.py)0
-rw-r--r--ironic/tests/unit/drivers/msftocs/test_common.py (renamed from ironic/tests/drivers/msftocs/test_common.py)8
-rw-r--r--ironic/tests/unit/drivers/msftocs/test_management.py (renamed from ironic/tests/drivers/msftocs/test_management.py)8
-rw-r--r--ironic/tests/unit/drivers/msftocs/test_msftocsclient.py (renamed from ironic/tests/drivers/msftocs/test_msftocsclient.py)2
-rw-r--r--ironic/tests/unit/drivers/msftocs/test_power.py (renamed from ironic/tests/drivers/msftocs/test_power.py)8
-rw-r--r--ironic/tests/unit/drivers/pxe_config.template (renamed from ironic/tests/drivers/pxe_config.template)0
-rw-r--r--ironic/tests/unit/drivers/pxe_grub_config.template (renamed from ironic/tests/drivers/pxe_grub_config.template)0
-rw-r--r--ironic/tests/unit/drivers/test_agent.py (renamed from ironic/tests/drivers/test_agent.py)8
-rw-r--r--ironic/tests/unit/drivers/test_agent_base_vendor.py (renamed from ironic/tests/drivers/test_agent_base_vendor.py)8
-rw-r--r--ironic/tests/unit/drivers/test_agent_client.py (renamed from ironic/tests/drivers/test_agent_client.py)2
-rw-r--r--ironic/tests/unit/drivers/test_base.py (renamed from ironic/tests/drivers/test_base.py)6
-rw-r--r--ironic/tests/unit/drivers/test_console_utils.py (renamed from ironic/tests/drivers/test_console_utils.py)6
-rw-r--r--ironic/tests/unit/drivers/test_deploy_utils.py (renamed from ironic/tests/drivers/test_deploy_utils.py)10
-rw-r--r--ironic/tests/unit/drivers/test_fake.py (renamed from ironic/tests/drivers/test_fake.py)6
-rw-r--r--ironic/tests/unit/drivers/test_iboot.py (renamed from ironic/tests/drivers/test_iboot.py)8
-rw-r--r--ironic/tests/unit/drivers/test_image_cache.py (renamed from ironic/tests/drivers/test_image_cache.py)2
-rw-r--r--ironic/tests/unit/drivers/test_inspector.py (renamed from ironic/tests/drivers/test_inspector.py)6
-rw-r--r--ironic/tests/unit/drivers/test_ipminative.py (renamed from ironic/tests/drivers/test_ipminative.py)8
-rw-r--r--ironic/tests/unit/drivers/test_ipmitool.py (renamed from ironic/tests/drivers/test_ipmitool.py)10
-rw-r--r--ironic/tests/unit/drivers/test_irmc.py (renamed from ironic/tests/drivers/test_irmc.py)0
-rw-r--r--ironic/tests/unit/drivers/test_iscsi_deploy.py (renamed from ironic/tests/drivers/test_iscsi_deploy.py)8
-rw-r--r--ironic/tests/unit/drivers/test_pxe.py (renamed from ironic/tests/drivers/test_pxe.py)8
-rw-r--r--ironic/tests/unit/drivers/test_seamicro.py (renamed from ironic/tests/drivers/test_seamicro.py)8
-rw-r--r--ironic/tests/unit/drivers/test_snmp.py (renamed from ironic/tests/drivers/test_snmp.py)10
-rw-r--r--ironic/tests/unit/drivers/test_ssh.py (renamed from ironic/tests/drivers/test_ssh.py)8
-rw-r--r--ironic/tests/unit/drivers/test_utils.py (renamed from ironic/tests/drivers/test_utils.py)6
-rw-r--r--ironic/tests/unit/drivers/test_virtualbox.py (renamed from ironic/tests/drivers/test_virtualbox.py)6
-rw-r--r--ironic/tests/unit/drivers/test_wol.py (renamed from ironic/tests/drivers/test_wol.py)6
-rw-r--r--ironic/tests/unit/drivers/third_party_driver_mock_specs.py (renamed from ironic/tests/drivers/third_party_driver_mock_specs.py)0
-rw-r--r--ironic/tests/unit/drivers/third_party_driver_mocks.py (renamed from ironic/tests/drivers/third_party_driver_mocks.py)3
-rw-r--r--ironic/tests/unit/drivers/ucs/__init__.py (renamed from ironic/tests/objects/__init__.py)0
-rw-r--r--ironic/tests/unit/drivers/ucs/test_helper.py (renamed from ironic/tests/drivers/ucs/test_helper.py)8
-rw-r--r--ironic/tests/unit/drivers/ucs/test_management.py (renamed from ironic/tests/drivers/ucs/test_management.py)8
-rw-r--r--ironic/tests/unit/drivers/ucs/test_power.py (renamed from ironic/tests/drivers/ucs/test_power.py)8
-rw-r--r--ironic/tests/unit/fake_policy.py (renamed from ironic/tests/fake_policy.py)0
-rw-r--r--ironic/tests/unit/objects/__init__.py0
-rw-r--r--ironic/tests/unit/objects/test_chassis.py (renamed from ironic/tests/objects/test_chassis.py)4
-rw-r--r--ironic/tests/unit/objects/test_conductor.py (renamed from ironic/tests/objects/test_conductor.py)4
-rw-r--r--ironic/tests/unit/objects/test_fields.py (renamed from ironic/tests/objects/test_fields.py)2
-rw-r--r--ironic/tests/unit/objects/test_node.py (renamed from ironic/tests/objects/test_node.py)4
-rw-r--r--ironic/tests/unit/objects/test_objects.py (renamed from ironic/tests/objects/test_objects.py)2
-rw-r--r--ironic/tests/unit/objects/test_port.py (renamed from ironic/tests/objects/test_port.py)4
-rw-r--r--ironic/tests/unit/objects/utils.py (renamed from ironic/tests/objects/utils.py)2
-rw-r--r--ironic/tests/unit/policy_fixture.py (renamed from ironic/tests/policy_fixture.py)2
-rw-r--r--ironic/tests/unit/raid_constants.py (renamed from ironic/tests/raid_constants.py)0
-rw-r--r--ironic/tests/unit/stubs.py (renamed from ironic/tests/stubs.py)0
140 files changed, 341 insertions, 333 deletions
diff --git a/ironic/tests/__init__.py b/ironic/tests/__init__.py
index 918237d30..e69de29bb 100644
--- a/ironic/tests/__init__.py
+++ b/ironic/tests/__init__.py
@@ -1,34 +0,0 @@
-# Copyright 2010 United States Government as represented by the
-# Administrator of the National Aeronautics and Space Administration.
-# All Rights Reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License"); you may
-# not use this file except in compliance with the License. You may obtain
-# a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-# License for the specific language governing permissions and limitations
-# under the License.
-
-"""
-:mod:`Ironic.tests` -- ironic Unittests
-=====================================================
-
-.. automodule:: ironic.tests
- :platform: Unix
-"""
-
-# TODO(deva): move eventlet imports to ironic.__init__ once we move to PBR
-
-import eventlet
-
-eventlet.monkey_patch(os=False)
-
-# See http://code.google.com/p/python-nose/issues/detail?id=373
-# The code below enables nosetests to work with i18n _() blocks
-import six.moves.builtins as __builtin__
-setattr(__builtin__, '_', lambda x: x)
diff --git a/ironic/tests/api/__init__.py b/ironic/tests/functional/__init__.py
index e69de29bb..e69de29bb 100644
--- a/ironic/tests/api/__init__.py
+++ b/ironic/tests/functional/__init__.py
diff --git a/ironic/tests/unit/__init__.py b/ironic/tests/unit/__init__.py
new file mode 100644
index 000000000..c3b5d1359
--- /dev/null
+++ b/ironic/tests/unit/__init__.py
@@ -0,0 +1,34 @@
+# Copyright 2010 United States Government as represented by the
+# Administrator of the National Aeronautics and Space Administration.
+# All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+
+"""
+:mod:`Ironic.tests` -- ironic Unittests
+=====================================================
+
+.. automodule:: ironic.tests.unit
+ :platform: Unix
+"""
+
+# TODO(deva): move eventlet imports to ironic.__init__ once we move to PBR
+
+import eventlet
+
+eventlet.monkey_patch(os=False)
+
+# See http://code.google.com/p/python-nose/issues/detail?id=373
+# The code below enables nosetests to work with i18n _() blocks
+import six.moves.builtins as __builtin__
+setattr(__builtin__, '_', lambda x: x)
diff --git a/ironic/tests/api/v1/__init__.py b/ironic/tests/unit/api/__init__.py
index e69de29bb..e69de29bb 100644
--- a/ironic/tests/api/v1/__init__.py
+++ b/ironic/tests/unit/api/__init__.py
diff --git a/ironic/tests/api/base.py b/ironic/tests/unit/api/base.py
index 2fb1de461..80d2ebb5a 100644
--- a/ironic/tests/api/base.py
+++ b/ironic/tests/unit/api/base.py
@@ -26,7 +26,7 @@ import pecan
import pecan.testing
from six.moves.urllib import parse as urlparse
-from ironic.tests.db import base
+from ironic.tests.unit.db import base
PATH_PREFIX = '/v1'
diff --git a/ironic/tests/api/test_acl.py b/ironic/tests/unit/api/test_acl.py
index 13bd44ee3..a05337932 100644
--- a/ironic/tests/api/test_acl.py
+++ b/ironic/tests/unit/api/test_acl.py
@@ -20,9 +20,9 @@ import mock
from oslo_config import cfg
from six.moves import http_client
-from ironic.tests.api import base
-from ironic.tests.api import utils
-from ironic.tests.db import utils as db_utils
+from ironic.tests.unit.api import base
+from ironic.tests.unit.api import utils
+from ironic.tests.unit.db import utils as db_utils
cfg.CONF.import_opt('cache', 'keystonemiddleware.auth_token',
group='keystone_authtoken')
diff --git a/ironic/tests/api/test_base.py b/ironic/tests/unit/api/test_base.py
index 4fe3d22cd..6df501d58 100644
--- a/ironic/tests/api/test_base.py
+++ b/ironic/tests/unit/api/test_base.py
@@ -18,7 +18,7 @@ from six.moves import http_client
from webob import exc
from ironic.api.controllers import base as cbase
-from ironic.tests.api import base
+from ironic.tests.unit.api import base
class TestBase(base.FunctionalTest):
diff --git a/ironic/tests/api/test_hooks.py b/ironic/tests/unit/api/test_hooks.py
index e1b3e5723..198efb810 100644
--- a/ironic/tests/api/test_hooks.py
+++ b/ironic/tests/unit/api/test_hooks.py
@@ -26,8 +26,8 @@ from webob import exc as webob_exc
from ironic.api.controllers import root
from ironic.api import hooks
from ironic.common import context
-from ironic.tests.api import base
-from ironic.tests import policy_fixture
+from ironic.tests.unit.api import base
+from ironic.tests.unit import policy_fixture
class FakeRequest(object):
diff --git a/ironic/tests/api/test_root.py b/ironic/tests/unit/api/test_root.py
index 91cf528db..649aff69c 100644
--- a/ironic/tests/api/test_root.py
+++ b/ironic/tests/unit/api/test_root.py
@@ -13,7 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
-from ironic.tests.api import base
+from ironic.tests.unit.api import base
class TestRoot(base.FunctionalTest):
diff --git a/ironic/tests/api/utils.py b/ironic/tests/unit/api/utils.py
index c8f11cefc..163cc7978 100644
--- a/ironic/tests/api/utils.py
+++ b/ironic/tests/unit/api/utils.py
@@ -22,7 +22,7 @@ import json
from ironic.api.controllers.v1 import chassis as chassis_controller
from ironic.api.controllers.v1 import node as node_controller
from ironic.api.controllers.v1 import port as port_controller
-from ironic.tests.db import utils
+from ironic.tests.unit.db import utils
ADMIN_TOKEN = '4562138218392831'
MEMBER_TOKEN = '4562138218392832'
diff --git a/ironic/tests/cmd/__init__.py b/ironic/tests/unit/api/v1/__init__.py
index e69de29bb..e69de29bb 100644
--- a/ironic/tests/cmd/__init__.py
+++ b/ironic/tests/unit/api/v1/__init__.py
diff --git a/ironic/tests/api/v1/test_chassis.py b/ironic/tests/unit/api/v1/test_chassis.py
index a4d177277..66c162250 100644
--- a/ironic/tests/api/v1/test_chassis.py
+++ b/ironic/tests/unit/api/v1/test_chassis.py
@@ -29,10 +29,10 @@ from wsme import types as wtypes
from ironic.api.controllers import base as api_base
from ironic.api.controllers import v1 as api_v1
from ironic.api.controllers.v1 import chassis as api_chassis
-from ironic.tests.api import base as test_api_base
-from ironic.tests.api import utils as apiutils
-from ironic.tests import base
-from ironic.tests.objects import utils as obj_utils
+from ironic.tests.unit.api import base as test_api_base
+from ironic.tests.unit.api import utils as apiutils
+from ironic.tests.unit import base
+from ironic.tests.unit.objects import utils as obj_utils
class TestChassisObject(base.TestCase):
diff --git a/ironic/tests/api/v1/test_drivers.py b/ironic/tests/unit/api/v1/test_drivers.py
index 5e548a063..abe0325fd 100644
--- a/ironic/tests/api/v1/test_drivers.py
+++ b/ironic/tests/unit/api/v1/test_drivers.py
@@ -24,7 +24,7 @@ from ironic.api.controllers import base as api_base
from ironic.api.controllers.v1 import driver
from ironic.common import exception
from ironic.conductor import rpcapi
-from ironic.tests.api import base
+from ironic.tests.unit.api import base
class TestListDrivers(base.FunctionalTest):
diff --git a/ironic/tests/api/v1/test_nodes.py b/ironic/tests/unit/api/v1/test_nodes.py
index 37a641123..0965d4732 100644
--- a/ironic/tests/api/v1/test_nodes.py
+++ b/ironic/tests/unit/api/v1/test_nodes.py
@@ -37,10 +37,10 @@ from ironic.common import exception
from ironic.common import states
from ironic.conductor import rpcapi
from ironic import objects
-from ironic.tests.api import base as test_api_base
-from ironic.tests.api import utils as test_api_utils
-from ironic.tests import base
-from ironic.tests.objects import utils as obj_utils
+from ironic.tests.unit.api import base as test_api_base
+from ironic.tests.unit.api import utils as test_api_utils
+from ironic.tests.unit import base
+from ironic.tests.unit.objects import utils as obj_utils
class TestNodeObject(base.TestCase):
diff --git a/ironic/tests/api/v1/test_ports.py b/ironic/tests/unit/api/v1/test_ports.py
index bff8be3b0..75e4889bb 100644
--- a/ironic/tests/api/v1/test_ports.py
+++ b/ironic/tests/unit/api/v1/test_ports.py
@@ -33,11 +33,11 @@ from ironic.api.controllers.v1 import port as api_port
from ironic.api.controllers.v1 import utils as api_utils
from ironic.common import exception
from ironic.conductor import rpcapi
-from ironic.tests.api import base as test_api_base
-from ironic.tests.api import utils as apiutils
-from ironic.tests import base
-from ironic.tests.db import utils as dbutils
-from ironic.tests.objects import utils as obj_utils
+from ironic.tests.unit.api import base as test_api_base
+from ironic.tests.unit.api import utils as apiutils
+from ironic.tests.unit import base
+from ironic.tests.unit.db import utils as dbutils
+from ironic.tests.unit.objects import utils as obj_utils
# NOTE(lucasagomes): When creating a port via API (POST)
diff --git a/ironic/tests/api/v1/test_root.py b/ironic/tests/unit/api/v1/test_root.py
index 772ed0f6e..24384bee5 100644
--- a/ironic/tests/api/v1/test_root.py
+++ b/ironic/tests/unit/api/v1/test_root.py
@@ -16,8 +16,8 @@ import mock
from webob import exc as webob_exc
from ironic.api.controllers import v1 as v1_api
-from ironic.tests.api import base as api_base
-from ironic.tests import base as test_base
+from ironic.tests.unit.api import base as api_base
+from ironic.tests.unit import base as test_base
class TestV1Routing(api_base.FunctionalTest):
diff --git a/ironic/tests/api/v1/test_types.py b/ironic/tests/unit/api/v1/test_types.py
index 67cc72a6a..9fb7747c5 100644
--- a/ironic/tests/api/v1/test_types.py
+++ b/ironic/tests/unit/api/v1/test_types.py
@@ -25,7 +25,7 @@ from wsme import types as wtypes
from ironic.api.controllers.v1 import types
from ironic.common import exception
from ironic.common import utils
-from ironic.tests import base
+from ironic.tests.unit import base
class TestMacAddressType(base.TestCase):
diff --git a/ironic/tests/api/v1/test_utils.py b/ironic/tests/unit/api/v1/test_utils.py
index f8c0f417f..03d351fcc 100644
--- a/ironic/tests/api/v1/test_utils.py
+++ b/ironic/tests/unit/api/v1/test_utils.py
@@ -25,8 +25,8 @@ import wsme
from ironic.api.controllers.v1 import utils
from ironic.common import exception
from ironic import objects
-from ironic.tests.api import utils as test_api_utils
-from ironic.tests import base
+from ironic.tests.unit.api import utils as test_api_utils
+from ironic.tests.unit import base
CONF = cfg.CONF
diff --git a/ironic/tests/api/v1/test_versions.py b/ironic/tests/unit/api/v1/test_versions.py
index f5ac5672c..39ff05e73 100644
--- a/ironic/tests/api/v1/test_versions.py
+++ b/ironic/tests/unit/api/v1/test_versions.py
@@ -18,7 +18,7 @@ Tests for the versions constants and methods.
import re
from ironic.api.controllers.v1 import versions
-from ironic.tests import base
+from ironic.tests.unit import base
class TestVersionConstants(base.TestCase):
diff --git a/ironic/tests/base.py b/ironic/tests/unit/base.py
index 4c1bc896f..37adbc0d4 100644
--- a/ironic/tests/base.py
+++ b/ironic/tests/unit/base.py
@@ -36,8 +36,8 @@ import testtools
from ironic.common import hash_ring
from ironic.objects import base as objects_base
-from ironic.tests import conf_fixture
-from ironic.tests import policy_fixture
+from ironic.tests.unit import conf_fixture
+from ironic.tests.unit import policy_fixture
CONF = cfg.CONF
diff --git a/ironic/tests/common/__init__.py b/ironic/tests/unit/cmd/__init__.py
index e69de29bb..e69de29bb 100644
--- a/ironic/tests/common/__init__.py
+++ b/ironic/tests/unit/cmd/__init__.py
diff --git a/ironic/tests/cmd/test_dbsync.py b/ironic/tests/unit/cmd/test_dbsync.py
index 2b68b0bd0..31e85996e 100644
--- a/ironic/tests/cmd/test_dbsync.py
+++ b/ironic/tests/unit/cmd/test_dbsync.py
@@ -16,7 +16,7 @@
# under the License.
from ironic.db import migration
-from ironic.tests.db import base
+from ironic.tests.unit.db import base
class DbSyncTestCase(base.DbTestCase):
diff --git a/ironic/tests/conductor/__init__.py b/ironic/tests/unit/common/__init__.py
index e69de29bb..e69de29bb 100644
--- a/ironic/tests/conductor/__init__.py
+++ b/ironic/tests/unit/common/__init__.py
diff --git a/ironic/tests/common/test_disk_partitioner.py b/ironic/tests/unit/common/test_disk_partitioner.py
index 4badcdbf7..dc87e206f 100644
--- a/ironic/tests/common/test_disk_partitioner.py
+++ b/ironic/tests/unit/common/test_disk_partitioner.py
@@ -20,7 +20,7 @@ from testtools.matchers import HasLength
from ironic.common import disk_partitioner
from ironic.common import exception
from ironic.common import utils
-from ironic.tests import base
+from ironic.tests.unit import base
@mock.patch.object(eventlet.greenthread, 'sleep', lambda seconds: None)
diff --git a/ironic/tests/common/test_driver_factory.py b/ironic/tests/unit/common/test_driver_factory.py
index 8cc49e46d..9035a0386 100644
--- a/ironic/tests/common/test_driver_factory.py
+++ b/ironic/tests/unit/common/test_driver_factory.py
@@ -17,7 +17,7 @@ from stevedore import dispatch
from ironic.common import driver_factory
from ironic.common import exception
-from ironic.tests import base
+from ironic.tests.unit import base
class FakeEp(object):
diff --git a/ironic/tests/common/test_exception.py b/ironic/tests/unit/common/test_exception.py
index c4dee6045..bf52f59d7 100644
--- a/ironic/tests/common/test_exception.py
+++ b/ironic/tests/unit/common/test_exception.py
@@ -15,7 +15,7 @@
import six
from ironic.common import exception
-from ironic.tests import base
+from ironic.tests.unit import base
class TestIronicException(base.TestCase):
diff --git a/ironic/tests/common/test_fsm.py b/ironic/tests/unit/common/test_fsm.py
index ab0f8fc3c..78a274fbc 100644
--- a/ironic/tests/common/test_fsm.py
+++ b/ironic/tests/unit/common/test_fsm.py
@@ -15,7 +15,7 @@
# under the License.
from ironic.common import fsm
-from ironic.tests import base
+from ironic.tests.unit import base
class FSMTest(base.TestCase):
diff --git a/ironic/tests/common/test_glance_service.py b/ironic/tests/unit/common/test_glance_service.py
index 37bfbe0ff..881b86eaa 100644
--- a/ironic/tests/common/test_glance_service.py
+++ b/ironic/tests/unit/common/test_glance_service.py
@@ -31,8 +31,8 @@ from ironic.common import exception
from ironic.common.glance_service import base_image_service
from ironic.common.glance_service import service_utils
from ironic.common import image_service as service
-from ironic.tests import base
-from ironic.tests import stubs
+from ironic.tests.unit import base
+from ironic.tests.unit import stubs
CONF = cfg.CONF
diff --git a/ironic/tests/common/test_hash_ring.py b/ironic/tests/unit/common/test_hash_ring.py
index ac448480f..832c975b2 100644
--- a/ironic/tests/common/test_hash_ring.py
+++ b/ironic/tests/unit/common/test_hash_ring.py
@@ -21,8 +21,8 @@ from testtools import matchers
from ironic.common import exception
from ironic.common import hash_ring
-from ironic.tests import base
-from ironic.tests.db import base as db_base
+from ironic.tests.unit import base
+from ironic.tests.unit.db import base as db_base
CONF = cfg.CONF
diff --git a/ironic/tests/common/test_image_service.py b/ironic/tests/unit/common/test_image_service.py
index b06ac5cd1..ed39f1bef 100644
--- a/ironic/tests/common/test_image_service.py
+++ b/ironic/tests/unit/common/test_image_service.py
@@ -25,7 +25,7 @@ from ironic.common import exception
from ironic.common.glance_service.v1 import image_service as glance_v1_service
from ironic.common import image_service
from ironic.common import keystone
-from ironic.tests import base
+from ironic.tests.unit import base
if six.PY3:
import io
diff --git a/ironic/tests/common/test_images.py b/ironic/tests/unit/common/test_images.py
index 868fe3c86..f6493df4e 100644
--- a/ironic/tests/common/test_images.py
+++ b/ironic/tests/unit/common/test_images.py
@@ -31,7 +31,7 @@ from ironic.common import image_service
from ironic.common import images
from ironic.common import utils
from ironic.openstack.common import imageutils
-from ironic.tests import base
+from ironic.tests.unit import base
if six.PY3:
import io
diff --git a/ironic/tests/common/test_keystone.py b/ironic/tests/unit/common/test_keystone.py
index f3e3b4cbb..913b7b4c4 100644
--- a/ironic/tests/common/test_keystone.py
+++ b/ironic/tests/unit/common/test_keystone.py
@@ -17,7 +17,7 @@ import mock
from ironic.common import exception
from ironic.common import keystone
-from ironic.tests import base
+from ironic.tests.unit import base
class FakeCatalog(object):
diff --git a/ironic/tests/common/test_network.py b/ironic/tests/unit/common/test_network.py
index 77c8f2f41..34990c253 100644
--- a/ironic/tests/common/test_network.py
+++ b/ironic/tests/unit/common/test_network.py
@@ -17,10 +17,10 @@ from oslo_utils import uuidutils
from ironic.common import network
from ironic.conductor import task_manager
-from ironic.tests.conductor import utils as mgr_utils
-from ironic.tests.db import base as db_base
-from ironic.tests.db import utils as db_utils
-from ironic.tests.objects import utils as object_utils
+from ironic.tests.unit.conductor import utils as mgr_utils
+from ironic.tests.unit.db import base as db_base
+from ironic.tests.unit.db import utils as db_utils
+from ironic.tests.unit.objects import utils as object_utils
class TestNetwork(db_base.DbTestCase):
diff --git a/ironic/tests/common/test_policy.py b/ironic/tests/unit/common/test_policy.py
index 231541468..fda4a5aaa 100644
--- a/ironic/tests/common/test_policy.py
+++ b/ironic/tests/unit/common/test_policy.py
@@ -16,7 +16,7 @@
# under the License.
from ironic.common import policy
-from ironic.tests import base
+from ironic.tests.unit import base
class PolicyTestCase(base.TestCase):
diff --git a/ironic/tests/common/test_pxe_utils.py b/ironic/tests/unit/common/test_pxe_utils.py
index dbcc5d142..0e086c1dc 100644
--- a/ironic/tests/common/test_pxe_utils.py
+++ b/ironic/tests/unit/common/test_pxe_utils.py
@@ -22,9 +22,9 @@ import six
from ironic.common import pxe_utils
from ironic.conductor import task_manager
-from ironic.tests.conductor import utils as mgr_utils
-from ironic.tests.db import base as db_base
-from ironic.tests.objects import utils as object_utils
+from ironic.tests.unit.conductor import utils as mgr_utils
+from ironic.tests.unit.db import base as db_base
+from ironic.tests.unit.objects import utils as object_utils
CONF = cfg.CONF
@@ -93,7 +93,7 @@ class TestPXEUtils(db_base.DbTestCase):
'{{ ROOT }}', '{{ DISK_IDENTIFIER }}')
expected_template = open(
- 'ironic/tests/drivers/pxe_config.template').read().rstrip()
+ 'ironic/tests/unit/drivers/pxe_config.template').read().rstrip()
self.assertEqual(six.text_type(expected_template), rendered_template)
@@ -103,8 +103,8 @@ class TestPXEUtils(db_base.DbTestCase):
self.agent_pxe_options, CONF.agent.agent_pxe_config_template,
'{{ ROOT }}', '{{ DISK_IDENTIFIER }}')
- expected_template = open(
- 'ironic/tests/drivers/agent_pxe_config.template').read().rstrip()
+ template_file = 'ironic/tests/unit/drivers/agent_pxe_config.template'
+ expected_template = open(template_file).read().rstrip()
self.assertEqual(six.text_type(expected_template), rendered_template)
@@ -123,7 +123,7 @@ class TestPXEUtils(db_base.DbTestCase):
'{{ ROOT }}', '{{ DISK_IDENTIFIER }}')
expected_template = open(
- 'ironic/tests/drivers/ipxe_config.template').read().rstrip()
+ 'ironic/tests/unit/drivers/ipxe_config.template').read().rstrip()
self.assertEqual(six.text_type(expected_template), rendered_template)
@@ -135,7 +135,7 @@ class TestPXEUtils(db_base.DbTestCase):
'{{ ROOT }}', '{{ DISK_IDENTIFIER }}')
expected_template = open(
- 'ironic/tests/drivers/elilo_efi_pxe_config.template'
+ 'ironic/tests/unit/drivers/elilo_efi_pxe_config.template'
).read().rstrip()
self.assertEqual(six.text_type(expected_template), rendered_template)
@@ -148,8 +148,8 @@ class TestPXEUtils(db_base.DbTestCase):
rendered_template = pxe_utils._build_pxe_config(
pxe_opts, grub_tmplte, '(( ROOT ))', '(( DISK_IDENTIFIER ))')
- expected_template = open(
- 'ironic/tests/drivers/pxe_grub_config.template').read().rstrip()
+ template_file = 'ironic/tests/unit/drivers/pxe_grub_config.template'
+ expected_template = open(template_file).read().rstrip()
self.assertEqual(six.text_type(expected_template), rendered_template)
diff --git a/ironic/tests/common/test_raid.py b/ironic/tests/unit/common/test_raid.py
index 893c7d2d4..88c3b68dc 100644
--- a/ironic/tests/common/test_raid.py
+++ b/ironic/tests/unit/common/test_raid.py
@@ -17,10 +17,10 @@ import json
from ironic.common import exception
from ironic.common import raid
from ironic.drivers import base as drivers_base
-from ironic.tests import base
-from ironic.tests.db import base as db_base
-from ironic.tests.objects import utils as obj_utils
-from ironic.tests import raid_constants
+from ironic.tests.unit import base
+from ironic.tests.unit.db import base as db_base
+from ironic.tests.unit.objects import utils as obj_utils
+from ironic.tests.unit import raid_constants
class ValidateRaidConfigurationTestCase(base.TestCase):
diff --git a/ironic/tests/common/test_states.py b/ironic/tests/unit/common/test_states.py
index 8b38fa504..206ded177 100644
--- a/ironic/tests/common/test_states.py
+++ b/ironic/tests/unit/common/test_states.py
@@ -17,7 +17,7 @@
import six
from ironic.common import states
-from ironic.tests import base
+from ironic.tests.unit import base
class StatesTest(base.TestCase):
diff --git a/ironic/tests/common/test_swift.py b/ironic/tests/unit/common/test_swift.py
index 43e3ef033..55ef68848 100644
--- a/ironic/tests/common/test_swift.py
+++ b/ironic/tests/unit/common/test_swift.py
@@ -24,7 +24,7 @@ from swiftclient import utils as swift_utils
from ironic.common import exception
from ironic.common import swift
-from ironic.tests import base
+from ironic.tests.unit import base
CONF = cfg.CONF
diff --git a/ironic/tests/common/test_utils.py b/ironic/tests/unit/common/test_utils.py
index 30f51456e..4898efc5d 100644
--- a/ironic/tests/common/test_utils.py
+++ b/ironic/tests/unit/common/test_utils.py
@@ -30,7 +30,7 @@ import six.moves.builtins as __builtin__
from ironic.common import exception
from ironic.common import utils
-from ironic.tests import base
+from ironic.tests.unit import base
CONF = cfg.CONF
diff --git a/ironic/tests/db/sqlalchemy/__init__.py b/ironic/tests/unit/conductor/__init__.py
index e69de29bb..e69de29bb 100644
--- a/ironic/tests/db/sqlalchemy/__init__.py
+++ b/ironic/tests/unit/conductor/__init__.py
diff --git a/ironic/tests/conductor/test_conductor_utils.py b/ironic/tests/unit/conductor/test_conductor_utils.py
index 913dcf3f7..72bfba89b 100644
--- a/ironic/tests/conductor/test_conductor_utils.py
+++ b/ironic/tests/unit/conductor/test_conductor_utils.py
@@ -19,11 +19,11 @@ from ironic.common import states
from ironic.conductor import task_manager
from ironic.conductor import utils as conductor_utils
from ironic import objects
-from ironic.tests import base as tests_base
-from ironic.tests.conductor import utils as mgr_utils
-from ironic.tests.db import base
-from ironic.tests.db import utils
-from ironic.tests.objects import utils as obj_utils
+from ironic.tests.unit import base as tests_base
+from ironic.tests.unit.conductor import utils as mgr_utils
+from ironic.tests.unit.db import base
+from ironic.tests.unit.db import utils
+from ironic.tests.unit.objects import utils as obj_utils
class NodeSetBootDeviceTestCase(base.DbTestCase):
diff --git a/ironic/tests/conductor/test_manager.py b/ironic/tests/unit/conductor/test_manager.py
index 13f4cdcd4..5ad9dbbe3 100644
--- a/ironic/tests/conductor/test_manager.py
+++ b/ironic/tests/unit/conductor/test_manager.py
@@ -44,11 +44,11 @@ from ironic.drivers import base as drivers_base
from ironic.drivers.modules import fake
from ironic import objects
from ironic.objects import base as obj_base
-from ironic.tests import base as tests_base
-from ironic.tests.conductor import utils as mgr_utils
-from ironic.tests.db import base as tests_db_base
-from ironic.tests.db import utils
-from ironic.tests.objects import utils as obj_utils
+from ironic.tests.unit import base as tests_base
+from ironic.tests.unit.conductor import utils as mgr_utils
+from ironic.tests.unit.db import base as tests_db_base
+from ironic.tests.unit.db import utils
+from ironic.tests.unit.objects import utils as obj_utils
CONF = cfg.CONF
@@ -238,8 +238,8 @@ class StartStopTestCase(_ServiceSetUpMixin, tests_db_base.DbTestCase):
@mock.patch.object(driver_factory.DriverFactory, '__getitem__')
def test_start_registers_driver_specific_tasks(self, get_mock):
init_names = ['fake1']
- expected_task_name = 'ironic.tests.conductor.test_manager.task'
- expected_task_name2 = 'ironic.tests.conductor.test_manager.iface'
+ expected_task_name = 'ironic.tests.unit.conductor.test_manager.task'
+ expected_task_name2 = 'ironic.tests.unit.conductor.test_manager.iface'
self.config(enabled_drivers=init_names)
class TestInterface(object):
diff --git a/ironic/tests/conductor/test_rpcapi.py b/ironic/tests/unit/conductor/test_rpcapi.py
index 30380b8b3..b7bba1814 100644
--- a/ironic/tests/conductor/test_rpcapi.py
+++ b/ironic/tests/unit/conductor/test_rpcapi.py
@@ -30,9 +30,9 @@ from ironic.common import states
from ironic.conductor import manager as conductor_manager
from ironic.conductor import rpcapi as conductor_rpcapi
from ironic import objects
-from ironic.tests import base as tests_base
-from ironic.tests.db import base
-from ironic.tests.db import utils as dbutils
+from ironic.tests.unit import base as tests_base
+from ironic.tests.unit.db import base
+from ironic.tests.unit.db import utils as dbutils
CONF = cfg.CONF
diff --git a/ironic/tests/conductor/test_task_manager.py b/ironic/tests/unit/conductor/test_task_manager.py
index d9ccf0f82..68bae9ed4 100644
--- a/ironic/tests/conductor/test_task_manager.py
+++ b/ironic/tests/unit/conductor/test_task_manager.py
@@ -28,9 +28,9 @@ from ironic.common import fsm
from ironic.common import states
from ironic.conductor import task_manager
from ironic import objects
-from ironic.tests import base as tests_base
-from ironic.tests.db import base as tests_db_base
-from ironic.tests.objects import utils as obj_utils
+from ironic.tests.unit import base as tests_base
+from ironic.tests.unit.db import base as tests_db_base
+from ironic.tests.unit.objects import utils as obj_utils
@mock.patch.object(objects.Node, 'get')
diff --git a/ironic/tests/conductor/test_utils.py b/ironic/tests/unit/conductor/test_utils.py
index 007acd899..4ab0fb19b 100644
--- a/ironic/tests/conductor/test_utils.py
+++ b/ironic/tests/unit/conductor/test_utils.py
@@ -17,8 +17,8 @@
"""Tests for Ironic Manager test utils."""
-from ironic.tests import base
-from ironic.tests.conductor import utils
+from ironic.tests.unit import base
+from ironic.tests.unit.conductor import utils
class UtilsTestCase(base.TestCase):
diff --git a/ironic/tests/conductor/utils.py b/ironic/tests/unit/conductor/utils.py
index 84b3f68d3..84b3f68d3 100644
--- a/ironic/tests/conductor/utils.py
+++ b/ironic/tests/unit/conductor/utils.py
diff --git a/ironic/tests/conf_fixture.py b/ironic/tests/unit/conf_fixture.py
index 42132f882..42132f882 100644
--- a/ironic/tests/conf_fixture.py
+++ b/ironic/tests/unit/conf_fixture.py
diff --git a/ironic/tests/db/__init__.py b/ironic/tests/unit/db/__init__.py
index d8851be0b..0f96bcc9c 100644
--- a/ironic/tests/db/__init__.py
+++ b/ironic/tests/unit/db/__init__.py
@@ -13,4 +13,4 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-from ironic.tests.db import *
+from ironic.tests.unit.db import *
diff --git a/ironic/tests/db/base.py b/ironic/tests/unit/db/base.py
index 842c65a3d..37d24b3b3 100644
--- a/ironic/tests/db/base.py
+++ b/ironic/tests/unit/db/base.py
@@ -26,7 +26,7 @@ from ironic.common import paths
from ironic.db import api as dbapi
from ironic.db.sqlalchemy import migration
from ironic.db.sqlalchemy import models
-from ironic.tests import base
+from ironic.tests.unit import base
CONF = cfg.CONF
diff --git a/ironic/tests/dhcp/__init__.py b/ironic/tests/unit/db/sqlalchemy/__init__.py
index e69de29bb..e69de29bb 100644
--- a/ironic/tests/dhcp/__init__.py
+++ b/ironic/tests/unit/db/sqlalchemy/__init__.py
diff --git a/ironic/tests/db/sqlalchemy/test_migrations.py b/ironic/tests/unit/db/sqlalchemy/test_migrations.py
index 8d88090f6..29551476b 100644
--- a/ironic/tests/db/sqlalchemy/test_migrations.py
+++ b/ironic/tests/unit/db/sqlalchemy/test_migrations.py
@@ -51,7 +51,7 @@ import sqlalchemy.exc
from ironic.common.i18n import _LE
from ironic.db.sqlalchemy import migration
from ironic.db.sqlalchemy import models
-from ironic.tests import base
+from ironic.tests.unit import base
LOG = logging.getLogger(__name__)
diff --git a/ironic/tests/db/sqlalchemy/test_types.py b/ironic/tests/unit/db/sqlalchemy/test_types.py
index 9079cb9f4..07d255fb9 100644
--- a/ironic/tests/db/sqlalchemy/test_types.py
+++ b/ironic/tests/unit/db/sqlalchemy/test_types.py
@@ -17,7 +17,7 @@ from oslo_utils import uuidutils
import ironic.db.sqlalchemy.api as sa_api
from ironic.db.sqlalchemy import models
-from ironic.tests.db import base
+from ironic.tests.unit.db import base
class SqlAlchemyCustomTypesTestCase(base.DbTestCase):
diff --git a/ironic/tests/db/test_chassis.py b/ironic/tests/unit/db/test_chassis.py
index 480d4e6cd..db298c7c6 100644
--- a/ironic/tests/db/test_chassis.py
+++ b/ironic/tests/unit/db/test_chassis.py
@@ -19,8 +19,8 @@ from oslo_utils import uuidutils
import six
from ironic.common import exception
-from ironic.tests.db import base
-from ironic.tests.db import utils
+from ironic.tests.unit.db import base
+from ironic.tests.unit.db import utils
class DbChassisTestCase(base.DbTestCase):
diff --git a/ironic/tests/db/test_conductor.py b/ironic/tests/unit/db/test_conductor.py
index 9a4d175bf..a6a4e1638 100644
--- a/ironic/tests/db/test_conductor.py
+++ b/ironic/tests/unit/db/test_conductor.py
@@ -21,8 +21,8 @@ import mock
from oslo_utils import timeutils
from ironic.common import exception
-from ironic.tests.db import base
-from ironic.tests.db import utils
+from ironic.tests.unit.db import base
+from ironic.tests.unit.db import utils
class DbConductorTestCase(base.DbTestCase):
diff --git a/ironic/tests/db/test_nodes.py b/ironic/tests/unit/db/test_nodes.py
index 224906005..cbb4c10d6 100644
--- a/ironic/tests/db/test_nodes.py
+++ b/ironic/tests/unit/db/test_nodes.py
@@ -24,8 +24,8 @@ import six
from ironic.common import exception
from ironic.common import states
-from ironic.tests.db import base
-from ironic.tests.db import utils
+from ironic.tests.unit.db import base
+from ironic.tests.unit.db import utils
class DbNodeTestCase(base.DbTestCase):
diff --git a/ironic/tests/db/test_ports.py b/ironic/tests/unit/db/test_ports.py
index 8cf6edebf..7d1be5184 100644
--- a/ironic/tests/db/test_ports.py
+++ b/ironic/tests/unit/db/test_ports.py
@@ -19,8 +19,8 @@ from oslo_utils import uuidutils
import six
from ironic.common import exception
-from ironic.tests.db import base
-from ironic.tests.db import utils as db_utils
+from ironic.tests.unit.db import base
+from ironic.tests.unit.db import utils as db_utils
class DbPortTestCase(base.DbTestCase):
diff --git a/ironic/tests/db/utils.py b/ironic/tests/unit/db/utils.py
index 7ea0c5811..7ea0c5811 100644
--- a/ironic/tests/db/utils.py
+++ b/ironic/tests/unit/db/utils.py
diff --git a/ironic/tests/drivers/amt/__init__.py b/ironic/tests/unit/dhcp/__init__.py
index e69de29bb..e69de29bb 100644
--- a/ironic/tests/drivers/amt/__init__.py
+++ b/ironic/tests/unit/dhcp/__init__.py
diff --git a/ironic/tests/dhcp/test_factory.py b/ironic/tests/unit/dhcp/test_factory.py
index b5c762848..8c1306957 100644
--- a/ironic/tests/dhcp/test_factory.py
+++ b/ironic/tests/unit/dhcp/test_factory.py
@@ -23,7 +23,7 @@ from ironic.common import exception
from ironic.dhcp import base as base_class
from ironic.dhcp import neutron
from ironic.dhcp import none
-from ironic.tests import base
+from ironic.tests.unit import base
class TestDHCPFactory(base.TestCase):
diff --git a/ironic/tests/dhcp/test_neutron.py b/ironic/tests/unit/dhcp/test_neutron.py
index b30a43360..2f5b77e95 100644
--- a/ironic/tests/dhcp/test_neutron.py
+++ b/ironic/tests/unit/dhcp/test_neutron.py
@@ -24,9 +24,9 @@ from ironic.common import exception
from ironic.common import pxe_utils
from ironic.conductor import task_manager
from ironic.dhcp import neutron
-from ironic.tests.conductor import utils as mgr_utils
-from ironic.tests.db import base as db_base
-from ironic.tests.objects import utils as object_utils
+from ironic.tests.unit.conductor import utils as mgr_utils
+from ironic.tests.unit.db import base as db_base
+from ironic.tests.unit.objects import utils as object_utils
class TestNeutron(db_base.DbTestCase):
diff --git a/ironic/tests/drivers/__init__.py b/ironic/tests/unit/drivers/__init__.py
index 0640dde8d..7a25e0c7f 100644
--- a/ironic/tests/drivers/__init__.py
+++ b/ironic/tests/unit/drivers/__init__.py
@@ -18,4 +18,4 @@
# external libraries mocked, we load the file which does that
# mocking here -- in the __init__.
-from ironic.tests.drivers import third_party_driver_mocks # noqa
+from ironic.tests.unit.drivers import third_party_driver_mocks # noqa
diff --git a/ironic/tests/drivers/agent_pxe_config.template b/ironic/tests/unit/drivers/agent_pxe_config.template
index 7b26d58cf..7b26d58cf 100644
--- a/ironic/tests/drivers/agent_pxe_config.template
+++ b/ironic/tests/unit/drivers/agent_pxe_config.template
diff --git a/ironic/tests/drivers/cimc/__init__.py b/ironic/tests/unit/drivers/amt/__init__.py
index e69de29bb..e69de29bb 100644
--- a/ironic/tests/drivers/cimc/__init__.py
+++ b/ironic/tests/unit/drivers/amt/__init__.py
diff --git a/ironic/tests/drivers/amt/test_common.py b/ironic/tests/unit/drivers/amt/test_common.py
index d8a5b32f4..6c80036ea 100644
--- a/ironic/tests/drivers/amt/test_common.py
+++ b/ironic/tests/unit/drivers/amt/test_common.py
@@ -21,12 +21,13 @@ from oslo_config import cfg
from ironic.common import exception
from ironic.drivers.modules.amt import common as amt_common
from ironic.drivers.modules.amt import resource_uris
-from ironic.tests import base
-from ironic.tests.db import base as db_base
-from ironic.tests.db import utils as db_utils
-from ironic.tests.drivers.drac import utils as test_utils
-from ironic.tests.drivers import third_party_driver_mock_specs as mock_specs
-from ironic.tests.objects import utils as obj_utils
+from ironic.tests.unit import base
+from ironic.tests.unit.db import base as db_base
+from ironic.tests.unit.db import utils as db_utils
+from ironic.tests.unit.drivers.drac import utils as test_utils
+from ironic.tests.unit.drivers import third_party_driver_mock_specs \
+ as mock_specs
+from ironic.tests.unit.objects import utils as obj_utils
INFO_DICT = db_utils.get_test_amt_info()
CONF = cfg.CONF
diff --git a/ironic/tests/drivers/amt/test_management.py b/ironic/tests/unit/drivers/amt/test_management.py
index 1203d7fc8..4d567c480 100644
--- a/ironic/tests/drivers/amt/test_management.py
+++ b/ironic/tests/unit/drivers/amt/test_management.py
@@ -24,12 +24,13 @@ from ironic.conductor import task_manager
from ironic.drivers.modules.amt import common as amt_common
from ironic.drivers.modules.amt import management as amt_mgmt
from ironic.drivers.modules.amt import resource_uris
-from ironic.tests.conductor import utils as mgr_utils
-from ironic.tests.db import base as db_base
-from ironic.tests.db import utils as db_utils
-from ironic.tests.drivers.drac import utils as test_utils
-from ironic.tests.drivers import third_party_driver_mock_specs as mock_specs
-from ironic.tests.objects import utils as obj_utils
+from ironic.tests.unit.conductor import utils as mgr_utils
+from ironic.tests.unit.db import base as db_base
+from ironic.tests.unit.db import utils as db_utils
+from ironic.tests.unit.drivers.drac import utils as test_utils
+from ironic.tests.unit.drivers import third_party_driver_mock_specs \
+ as mock_specs
+from ironic.tests.unit.objects import utils as obj_utils
INFO_DICT = db_utils.get_test_amt_info()
CONF = cfg.CONF
diff --git a/ironic/tests/drivers/amt/test_power.py b/ironic/tests/unit/drivers/amt/test_power.py
index 2f5fa70e2..1d203a441 100644
--- a/ironic/tests/drivers/amt/test_power.py
+++ b/ironic/tests/unit/drivers/amt/test_power.py
@@ -26,11 +26,11 @@ from ironic.drivers.modules.amt import common as amt_common
from ironic.drivers.modules.amt import management as amt_mgmt
from ironic.drivers.modules.amt import power as amt_power
from ironic.drivers.modules.amt import resource_uris
-from ironic.tests.conductor import utils as mgr_utils
-from ironic.tests.db import base as db_base
-from ironic.tests.db import utils as db_utils
-from ironic.tests.drivers.drac import utils as test_utils
-from ironic.tests.objects import utils as obj_utils
+from ironic.tests.unit.conductor import utils as mgr_utils
+from ironic.tests.unit.db import base as db_base
+from ironic.tests.unit.db import utils as db_utils
+from ironic.tests.unit.drivers.drac import utils as test_utils
+from ironic.tests.unit.objects import utils as obj_utils
INFO_DICT = db_utils.get_test_amt_info()
CONF = cfg.CONF
diff --git a/ironic/tests/drivers/amt/test_vendor.py b/ironic/tests/unit/drivers/amt/test_vendor.py
index 60c1f3f76..07d893251 100644
--- a/ironic/tests/drivers/amt/test_vendor.py
+++ b/ironic/tests/unit/drivers/amt/test_vendor.py
@@ -20,10 +20,10 @@ from ironic.common import states
from ironic.conductor import task_manager
from ironic.drivers.modules.amt import management as amt_mgmt
from ironic.drivers.modules import iscsi_deploy
-from ironic.tests.conductor import utils as mgr_utils
-from ironic.tests.db import base as db_base
-from ironic.tests.db import utils as db_utils
-from ironic.tests.objects import utils as obj_utils
+from ironic.tests.unit.conductor import utils as mgr_utils
+from ironic.tests.unit.db import base as db_base
+from ironic.tests.unit.db import utils as db_utils
+from ironic.tests.unit.objects import utils as obj_utils
INFO_DICT = db_utils.get_test_amt_info()
diff --git a/ironic/tests/drivers/drac/__init__.py b/ironic/tests/unit/drivers/cimc/__init__.py
index e69de29bb..e69de29bb 100644
--- a/ironic/tests/drivers/drac/__init__.py
+++ b/ironic/tests/unit/drivers/cimc/__init__.py
diff --git a/ironic/tests/drivers/cimc/test_common.py b/ironic/tests/unit/drivers/cimc/test_common.py
index 84478cd97..0924f81de 100644
--- a/ironic/tests/drivers/cimc/test_common.py
+++ b/ironic/tests/unit/drivers/cimc/test_common.py
@@ -20,10 +20,10 @@ from oslo_utils import importutils
from ironic.common import exception
from ironic.conductor import task_manager
from ironic.drivers.modules.cimc import common as cimc_common
-from ironic.tests.conductor import utils as mgr_utils
-from ironic.tests.db import base as db_base
-from ironic.tests.db import utils as db_utils
-from ironic.tests.objects import utils as obj_utils
+from ironic.tests.unit.conductor import utils as mgr_utils
+from ironic.tests.unit.db import base as db_base
+from ironic.tests.unit.db import utils as db_utils
+from ironic.tests.unit.objects import utils as obj_utils
imcsdk = importutils.try_import('ImcSdk')
diff --git a/ironic/tests/drivers/cimc/test_management.py b/ironic/tests/unit/drivers/cimc/test_management.py
index dc3bf917a..49f42a386 100644
--- a/ironic/tests/drivers/cimc/test_management.py
+++ b/ironic/tests/unit/drivers/cimc/test_management.py
@@ -20,7 +20,7 @@ from ironic.common import boot_devices
from ironic.common import exception
from ironic.conductor import task_manager
from ironic.drivers.modules.cimc import common
-from ironic.tests.drivers.cimc import test_common
+from ironic.tests.unit.drivers.cimc import test_common
imcsdk = importutils.try_import('ImcSdk')
diff --git a/ironic/tests/drivers/cimc/test_power.py b/ironic/tests/unit/drivers/cimc/test_power.py
index d82c71990..57ac5d97f 100644
--- a/ironic/tests/drivers/cimc/test_power.py
+++ b/ironic/tests/unit/drivers/cimc/test_power.py
@@ -22,7 +22,7 @@ from ironic.common import states
from ironic.conductor import task_manager
from ironic.drivers.modules.cimc import common
from ironic.drivers.modules.cimc import power
-from ironic.tests.drivers.cimc import test_common
+from ironic.tests.unit.drivers.cimc import test_common
imcsdk = importutils.try_import('ImcSdk')
diff --git a/ironic/tests/drivers/ilo/__init__.py b/ironic/tests/unit/drivers/drac/__init__.py
index e69de29bb..e69de29bb 100644
--- a/ironic/tests/drivers/ilo/__init__.py
+++ b/ironic/tests/unit/drivers/drac/__init__.py
diff --git a/ironic/tests/drivers/drac/bios_wsman_mock.py b/ironic/tests/unit/drivers/drac/bios_wsman_mock.py
index 245d27c01..245d27c01 100644
--- a/ironic/tests/drivers/drac/bios_wsman_mock.py
+++ b/ironic/tests/unit/drivers/drac/bios_wsman_mock.py
diff --git a/ironic/tests/drivers/drac/test_bios.py b/ironic/tests/unit/drivers/drac/test_bios.py
index 4b063c60a..e3f2c4e39 100644
--- a/ironic/tests/drivers/drac/test_bios.py
+++ b/ironic/tests/unit/drivers/drac/test_bios.py
@@ -27,12 +27,12 @@ from ironic.drivers.modules.drac import bios
from ironic.drivers.modules.drac import client as drac_client
from ironic.drivers.modules.drac import management as drac_mgmt
from ironic.drivers.modules.drac import resource_uris
-from ironic.tests.conductor import utils as mgr_utils
-from ironic.tests.db import base as db_base
-from ironic.tests.db import utils as db_utils
-from ironic.tests.drivers.drac import bios_wsman_mock
-from ironic.tests.drivers.drac import utils as test_utils
-from ironic.tests.objects import utils as obj_utils
+from ironic.tests.unit.conductor import utils as mgr_utils
+from ironic.tests.unit.db import base as db_base
+from ironic.tests.unit.db import utils as db_utils
+from ironic.tests.unit.drivers.drac import bios_wsman_mock
+from ironic.tests.unit.drivers.drac import utils as test_utils
+from ironic.tests.unit.objects import utils as obj_utils
from six.moves.urllib.parse import unquote
FAKE_DRAC = db_utils.get_test_drac_info()
diff --git a/ironic/tests/drivers/drac/test_client.py b/ironic/tests/unit/drivers/drac/test_client.py
index a7735c45d..93f8fbb24 100644
--- a/ironic/tests/drivers/drac/test_client.py
+++ b/ironic/tests/unit/drivers/drac/test_client.py
@@ -22,10 +22,11 @@ import mock
from ironic.common import exception
from ironic.drivers.modules.drac import client as drac_client
-from ironic.tests import base
-from ironic.tests.db import utils as db_utils
-from ironic.tests.drivers.drac import utils as test_utils
-from ironic.tests.drivers import third_party_driver_mock_specs as mock_specs
+from ironic.tests.unit import base
+from ironic.tests.unit.db import utils as db_utils
+from ironic.tests.unit.drivers.drac import utils as test_utils
+from ironic.tests.unit.drivers import third_party_driver_mock_specs \
+ as mock_specs
INFO_DICT = db_utils.get_test_drac_info()
diff --git a/ironic/tests/drivers/drac/test_common.py b/ironic/tests/unit/drivers/drac/test_common.py
index c1d4e63ff..2f2b7b7d4 100644
--- a/ironic/tests/drivers/drac/test_common.py
+++ b/ironic/tests/unit/drivers/drac/test_common.py
@@ -21,9 +21,9 @@ from testtools.matchers import HasLength
from ironic.common import exception
from ironic.drivers.modules.drac import common as drac_common
-from ironic.tests.db import base as db_base
-from ironic.tests.db import utils as db_utils
-from ironic.tests.objects import utils as obj_utils
+from ironic.tests.unit.db import base as db_base
+from ironic.tests.unit.db import utils as db_utils
+from ironic.tests.unit.objects import utils as obj_utils
INFO_DICT = db_utils.get_test_drac_info()
diff --git a/ironic/tests/drivers/drac/test_management.py b/ironic/tests/unit/drivers/drac/test_management.py
index 1f6d6bc89..249f31bdd 100644
--- a/ironic/tests/drivers/drac/test_management.py
+++ b/ironic/tests/unit/drivers/drac/test_management.py
@@ -28,12 +28,13 @@ from ironic.drivers.modules.drac import client as drac_client
from ironic.drivers.modules.drac import common as drac_common
from ironic.drivers.modules.drac import management as drac_mgmt
from ironic.drivers.modules.drac import resource_uris
-from ironic.tests.conductor import utils as mgr_utils
-from ironic.tests.db import base as db_base
-from ironic.tests.db import utils as db_utils
-from ironic.tests.drivers.drac import utils as test_utils
-from ironic.tests.drivers import third_party_driver_mock_specs as mock_specs
-from ironic.tests.objects import utils as obj_utils
+from ironic.tests.unit.conductor import utils as mgr_utils
+from ironic.tests.unit.db import base as db_base
+from ironic.tests.unit.db import utils as db_utils
+from ironic.tests.unit.drivers.drac import utils as test_utils
+from ironic.tests.unit.drivers import third_party_driver_mock_specs \
+ as mock_specs
+from ironic.tests.unit.objects import utils as obj_utils
INFO_DICT = db_utils.get_test_drac_info()
diff --git a/ironic/tests/drivers/drac/test_power.py b/ironic/tests/unit/drivers/drac/test_power.py
index f13be26ce..26cf2f25f 100644
--- a/ironic/tests/drivers/drac/test_power.py
+++ b/ironic/tests/unit/drivers/drac/test_power.py
@@ -24,11 +24,12 @@ from ironic.drivers.modules.drac import client as drac_client
from ironic.drivers.modules.drac import common as drac_common
from ironic.drivers.modules.drac import power as drac_power
from ironic.drivers.modules.drac import resource_uris
-from ironic.tests.conductor import utils as mgr_utils
-from ironic.tests.db import base
-from ironic.tests.db import utils as db_utils
-from ironic.tests.drivers.drac import utils as test_utils
-from ironic.tests.drivers import third_party_driver_mock_specs as mock_specs
+from ironic.tests.unit.conductor import utils as mgr_utils
+from ironic.tests.unit.db import base
+from ironic.tests.unit.db import utils as db_utils
+from ironic.tests.unit.drivers.drac import utils as test_utils
+from ironic.tests.unit.drivers import third_party_driver_mock_specs \
+ as mock_specs
INFO_DICT = db_utils.get_test_drac_info()
diff --git a/ironic/tests/drivers/drac/utils.py b/ironic/tests/unit/drivers/drac/utils.py
index 6338f7168..6338f7168 100644
--- a/ironic/tests/drivers/drac/utils.py
+++ b/ironic/tests/unit/drivers/drac/utils.py
diff --git a/ironic/tests/drivers/elilo_efi_pxe_config.template b/ironic/tests/unit/drivers/elilo_efi_pxe_config.template
index 0dca09d8c..0dca09d8c 100644
--- a/ironic/tests/drivers/elilo_efi_pxe_config.template
+++ b/ironic/tests/unit/drivers/elilo_efi_pxe_config.template
diff --git a/ironic/tests/drivers/irmc/__init__.py b/ironic/tests/unit/drivers/ilo/__init__.py
index e69de29bb..e69de29bb 100644
--- a/ironic/tests/drivers/irmc/__init__.py
+++ b/ironic/tests/unit/drivers/ilo/__init__.py
diff --git a/ironic/tests/drivers/ilo/test_common.py b/ironic/tests/unit/drivers/ilo/test_common.py
index 5040a377d..10b1ad305 100644
--- a/ironic/tests/drivers/ilo/test_common.py
+++ b/ironic/tests/unit/drivers/ilo/test_common.py
@@ -30,10 +30,10 @@ from ironic.common import swift
from ironic.common import utils
from ironic.conductor import task_manager
from ironic.drivers.modules.ilo import common as ilo_common
-from ironic.tests.conductor import utils as mgr_utils
-from ironic.tests.db import base as db_base
-from ironic.tests.db import utils as db_utils
-from ironic.tests.objects import utils as obj_utils
+from ironic.tests.unit.conductor import utils as mgr_utils
+from ironic.tests.unit.db import base as db_base
+from ironic.tests.unit.db import utils as db_utils
+from ironic.tests.unit.objects import utils as obj_utils
ilo_client = importutils.try_import('proliantutils.ilo.client')
ilo_error = importutils.try_import('proliantutils.exception')
diff --git a/ironic/tests/drivers/ilo/test_deploy.py b/ironic/tests/unit/drivers/ilo/test_deploy.py
index df886cd09..451761bed 100644
--- a/ironic/tests/drivers/ilo/test_deploy.py
+++ b/ironic/tests/unit/drivers/ilo/test_deploy.py
@@ -38,10 +38,10 @@ from ironic.drivers.modules.ilo import common as ilo_common
from ironic.drivers.modules.ilo import deploy as ilo_deploy
from ironic.drivers.modules import iscsi_deploy
from ironic.drivers import utils as driver_utils
-from ironic.tests.conductor import utils as mgr_utils
-from ironic.tests.db import base as db_base
-from ironic.tests.db import utils as db_utils
-from ironic.tests.objects import utils as obj_utils
+from ironic.tests.unit.conductor import utils as mgr_utils
+from ironic.tests.unit.db import base as db_base
+from ironic.tests.unit.db import utils as db_utils
+from ironic.tests.unit.objects import utils as obj_utils
if six.PY3:
diff --git a/ironic/tests/drivers/ilo/test_inspect.py b/ironic/tests/unit/drivers/ilo/test_inspect.py
index 359e291d6..94ddbdd45 100644
--- a/ironic/tests/drivers/ilo/test_inspect.py
+++ b/ironic/tests/unit/drivers/ilo/test_inspect.py
@@ -28,10 +28,10 @@ from ironic.db import api as dbapi
from ironic.drivers.modules.ilo import common as ilo_common
from ironic.drivers.modules.ilo import inspect as ilo_inspect
from ironic.drivers.modules.ilo import power as ilo_power
-from ironic.tests.conductor import utils as mgr_utils
-from ironic.tests.db import base as db_base
-from ironic.tests.db import utils as db_utils
-from ironic.tests.objects import utils as obj_utils
+from ironic.tests.unit.conductor import utils as mgr_utils
+from ironic.tests.unit.db import base as db_base
+from ironic.tests.unit.db import utils as db_utils
+from ironic.tests.unit.objects import utils as obj_utils
INFO_DICT = db_utils.get_test_ilo_info()
diff --git a/ironic/tests/drivers/ilo/test_management.py b/ironic/tests/unit/drivers/ilo/test_management.py
index 451ec6e25..a3a9b7910 100644
--- a/ironic/tests/drivers/ilo/test_management.py
+++ b/ironic/tests/unit/drivers/ilo/test_management.py
@@ -24,10 +24,10 @@ from ironic.conductor import task_manager
from ironic.drivers.modules.ilo import common as ilo_common
from ironic.drivers.modules.ilo import management as ilo_management
from ironic.drivers.modules import ipmitool
-from ironic.tests.conductor import utils as mgr_utils
-from ironic.tests.db import base as db_base
-from ironic.tests.db import utils as db_utils
-from ironic.tests.objects import utils as obj_utils
+from ironic.tests.unit.conductor import utils as mgr_utils
+from ironic.tests.unit.db import base as db_base
+from ironic.tests.unit.db import utils as db_utils
+from ironic.tests.unit.objects import utils as obj_utils
ilo_error = importutils.try_import('proliantutils.exception')
diff --git a/ironic/tests/drivers/ilo/test_power.py b/ironic/tests/unit/drivers/ilo/test_power.py
index 9e99ab9b6..13fade795 100644
--- a/ironic/tests/drivers/ilo/test_power.py
+++ b/ironic/tests/unit/drivers/ilo/test_power.py
@@ -26,10 +26,10 @@ from ironic.conductor import task_manager
from ironic.conductor import utils as manager_utils
from ironic.drivers.modules.ilo import common as ilo_common
from ironic.drivers.modules.ilo import power as ilo_power
-from ironic.tests.conductor import utils as mgr_utils
-from ironic.tests.db import base as db_base
-from ironic.tests.db import utils as db_utils
-from ironic.tests.objects import utils as obj_utils
+from ironic.tests.unit.conductor import utils as mgr_utils
+from ironic.tests.unit.db import base as db_base
+from ironic.tests.unit.db import utils as db_utils
+from ironic.tests.unit.objects import utils as obj_utils
ilo_error = importutils.try_import('proliantutils.exception')
diff --git a/ironic/tests/drivers/ipxe_config.template b/ironic/tests/unit/drivers/ipxe_config.template
index bc803d4a7..bc803d4a7 100644
--- a/ironic/tests/drivers/ipxe_config.template
+++ b/ironic/tests/unit/drivers/ipxe_config.template
diff --git a/ironic/tests/drivers/msftocs/__init__.py b/ironic/tests/unit/drivers/irmc/__init__.py
index e69de29bb..e69de29bb 100644
--- a/ironic/tests/drivers/msftocs/__init__.py
+++ b/ironic/tests/unit/drivers/irmc/__init__.py
diff --git a/ironic/tests/drivers/irmc/fake_sensors_data_ng.xml b/ironic/tests/unit/drivers/irmc/fake_sensors_data_ng.xml
index c8788427b..c8788427b 100644
--- a/ironic/tests/drivers/irmc/fake_sensors_data_ng.xml
+++ b/ironic/tests/unit/drivers/irmc/fake_sensors_data_ng.xml
diff --git a/ironic/tests/drivers/irmc/fake_sensors_data_ok.xml b/ironic/tests/unit/drivers/irmc/fake_sensors_data_ok.xml
index fb8edba68..fb8edba68 100644
--- a/ironic/tests/drivers/irmc/fake_sensors_data_ok.xml
+++ b/ironic/tests/unit/drivers/irmc/fake_sensors_data_ok.xml
diff --git a/ironic/tests/drivers/irmc/test_common.py b/ironic/tests/unit/drivers/irmc/test_common.py
index a1e088580..0876e76d0 100644
--- a/ironic/tests/drivers/irmc/test_common.py
+++ b/ironic/tests/unit/drivers/irmc/test_common.py
@@ -21,11 +21,12 @@ import mock
from ironic.common import exception
from ironic.conductor import task_manager
from ironic.drivers.modules.irmc import common as irmc_common
-from ironic.tests.conductor import utils as mgr_utils
-from ironic.tests.db import base as db_base
-from ironic.tests.db import utils as db_utils
-from ironic.tests.drivers import third_party_driver_mock_specs as mock_specs
-from ironic.tests.objects import utils as obj_utils
+from ironic.tests.unit.conductor import utils as mgr_utils
+from ironic.tests.unit.db import base as db_base
+from ironic.tests.unit.db import utils as db_utils
+from ironic.tests.unit.drivers import third_party_driver_mock_specs \
+ as mock_specs
+from ironic.tests.unit.objects import utils as obj_utils
class IRMCValidateParametersTestCase(db_base.DbTestCase):
diff --git a/ironic/tests/drivers/irmc/test_deploy.py b/ironic/tests/unit/drivers/irmc/test_deploy.py
index 36fd2b014..bba950cbf 100644
--- a/ironic/tests/drivers/irmc/test_deploy.py
+++ b/ironic/tests/unit/drivers/irmc/test_deploy.py
@@ -39,10 +39,10 @@ from ironic.drivers.modules import deploy_utils
from ironic.drivers.modules.irmc import common as irmc_common
from ironic.drivers.modules.irmc import deploy as irmc_deploy
from ironic.drivers.modules import iscsi_deploy
-from ironic.tests.conductor import utils as mgr_utils
-from ironic.tests.db import base as db_base
-from ironic.tests.db import utils as db_utils
-from ironic.tests.objects import utils as obj_utils
+from ironic.tests.unit.conductor import utils as mgr_utils
+from ironic.tests.unit.db import base as db_base
+from ironic.tests.unit.db import utils as db_utils
+from ironic.tests.unit.objects import utils as obj_utils
if six.PY3:
diff --git a/ironic/tests/drivers/irmc/test_management.py b/ironic/tests/unit/drivers/irmc/test_management.py
index 2b8dde515..be75321ce 100644
--- a/ironic/tests/drivers/irmc/test_management.py
+++ b/ironic/tests/unit/drivers/irmc/test_management.py
@@ -29,11 +29,12 @@ from ironic.drivers.modules import ipmitool
from ironic.drivers.modules.irmc import common as irmc_common
from ironic.drivers.modules.irmc import management as irmc_management
from ironic.drivers import utils as driver_utils
-from ironic.tests.conductor import utils as mgr_utils
-from ironic.tests.db import base as db_base
-from ironic.tests.db import utils as db_utils
-from ironic.tests.drivers import third_party_driver_mock_specs as mock_specs
-from ironic.tests.objects import utils as obj_utils
+from ironic.tests.unit.conductor import utils as mgr_utils
+from ironic.tests.unit.db import base as db_base
+from ironic.tests.unit.db import utils as db_utils
+from ironic.tests.unit.drivers import third_party_driver_mock_specs \
+ as mock_specs
+from ironic.tests.unit.objects import utils as obj_utils
INFO_DICT = db_utils.get_test_irmc_info()
diff --git a/ironic/tests/drivers/irmc/test_power.py b/ironic/tests/unit/drivers/irmc/test_power.py
index a3d3a5e4b..1b51f9eac 100644
--- a/ironic/tests/drivers/irmc/test_power.py
+++ b/ironic/tests/unit/drivers/irmc/test_power.py
@@ -27,10 +27,10 @@ from ironic.conductor import utils as manager_utils
from ironic.drivers.modules.irmc import common as irmc_common
from ironic.drivers.modules.irmc import deploy as irmc_deploy
from ironic.drivers.modules.irmc import power as irmc_power
-from ironic.tests.conductor import utils as mgr_utils
-from ironic.tests.db import base as db_base
-from ironic.tests.db import utils as db_utils
-from ironic.tests.objects import utils as obj_utils
+from ironic.tests.unit.conductor import utils as mgr_utils
+from ironic.tests.unit.db import base as db_base
+from ironic.tests.unit.db import utils as db_utils
+from ironic.tests.unit.objects import utils as obj_utils
INFO_DICT = db_utils.get_test_irmc_info()
CONF = cfg.CONF
diff --git a/ironic/tests/drivers/ucs/__init__.py b/ironic/tests/unit/drivers/msftocs/__init__.py
index e69de29bb..e69de29bb 100644
--- a/ironic/tests/drivers/ucs/__init__.py
+++ b/ironic/tests/unit/drivers/msftocs/__init__.py
diff --git a/ironic/tests/drivers/msftocs/test_common.py b/ironic/tests/unit/drivers/msftocs/test_common.py
index 75fe71fe2..c5891a743 100644
--- a/ironic/tests/drivers/msftocs/test_common.py
+++ b/ironic/tests/unit/drivers/msftocs/test_common.py
@@ -22,10 +22,10 @@ import mock
from ironic.common import exception
from ironic.conductor import task_manager
from ironic.drivers.modules.msftocs import common as msftocs_common
-from ironic.tests.conductor import utils as mgr_utils
-from ironic.tests.db import base as db_base
-from ironic.tests.db import utils as db_utils
-from ironic.tests.objects import utils as obj_utils
+from ironic.tests.unit.conductor import utils as mgr_utils
+from ironic.tests.unit.db import base as db_base
+from ironic.tests.unit.db import utils as db_utils
+from ironic.tests.unit.objects import utils as obj_utils
INFO_DICT = db_utils.get_test_msftocs_info()
diff --git a/ironic/tests/drivers/msftocs/test_management.py b/ironic/tests/unit/drivers/msftocs/test_management.py
index 83ab2f28f..a121a778d 100644
--- a/ironic/tests/drivers/msftocs/test_management.py
+++ b/ironic/tests/unit/drivers/msftocs/test_management.py
@@ -25,10 +25,10 @@ from ironic.conductor import task_manager
from ironic.drivers.modules.msftocs import common as msftocs_common
from ironic.drivers.modules.msftocs import msftocsclient
from ironic.drivers import utils as drivers_utils
-from ironic.tests.conductor import utils as mgr_utils
-from ironic.tests.db import base as db_base
-from ironic.tests.db import utils as db_utils
-from ironic.tests.objects import utils as obj_utils
+from ironic.tests.unit.conductor import utils as mgr_utils
+from ironic.tests.unit.db import base as db_base
+from ironic.tests.unit.db import utils as db_utils
+from ironic.tests.unit.objects import utils as obj_utils
INFO_DICT = db_utils.get_test_msftocs_info()
diff --git a/ironic/tests/drivers/msftocs/test_msftocsclient.py b/ironic/tests/unit/drivers/msftocs/test_msftocsclient.py
index 517429fc6..15be486c5 100644
--- a/ironic/tests/drivers/msftocs/test_msftocsclient.py
+++ b/ironic/tests/unit/drivers/msftocs/test_msftocsclient.py
@@ -23,7 +23,7 @@ from requests import exceptions as requests_exceptions
from ironic.common import exception
from ironic.drivers.modules.msftocs import msftocsclient
-from ironic.tests import base
+from ironic.tests.unit import base
FAKE_BOOT_RESPONSE = (
diff --git a/ironic/tests/drivers/msftocs/test_power.py b/ironic/tests/unit/drivers/msftocs/test_power.py
index 0e3e12fd9..aeeabe710 100644
--- a/ironic/tests/drivers/msftocs/test_power.py
+++ b/ironic/tests/unit/drivers/msftocs/test_power.py
@@ -24,10 +24,10 @@ from ironic.common import states
from ironic.conductor import task_manager
from ironic.drivers.modules.msftocs import common as msftocs_common
from ironic.drivers.modules.msftocs import msftocsclient
-from ironic.tests.conductor import utils as mgr_utils
-from ironic.tests.db import base as db_base
-from ironic.tests.db import utils as db_utils
-from ironic.tests.objects import utils as obj_utils
+from ironic.tests.unit.conductor import utils as mgr_utils
+from ironic.tests.unit.db import base as db_base
+from ironic.tests.unit.db import utils as db_utils
+from ironic.tests.unit.objects import utils as obj_utils
INFO_DICT = db_utils.get_test_msftocs_info()
diff --git a/ironic/tests/drivers/pxe_config.template b/ironic/tests/unit/drivers/pxe_config.template
index 6bbc9afc5..6bbc9afc5 100644
--- a/ironic/tests/drivers/pxe_config.template
+++ b/ironic/tests/unit/drivers/pxe_config.template
diff --git a/ironic/tests/drivers/pxe_grub_config.template b/ironic/tests/unit/drivers/pxe_grub_config.template
index 96444c125..96444c125 100644
--- a/ironic/tests/drivers/pxe_grub_config.template
+++ b/ironic/tests/unit/drivers/pxe_grub_config.template
diff --git a/ironic/tests/drivers/test_agent.py b/ironic/tests/unit/drivers/test_agent.py
index aadf1dcb9..41fe87a77 100644
--- a/ironic/tests/drivers/test_agent.py
+++ b/ironic/tests/unit/drivers/test_agent.py
@@ -30,10 +30,10 @@ from ironic.drivers.modules import agent_client
from ironic.drivers.modules import deploy_utils
from ironic.drivers.modules import fake
from ironic.drivers.modules import pxe
-from ironic.tests.conductor import utils as mgr_utils
-from ironic.tests.db import base as db_base
-from ironic.tests.db import utils as db_utils
-from ironic.tests.objects import utils as object_utils
+from ironic.tests.unit.conductor import utils as mgr_utils
+from ironic.tests.unit.db import base as db_base
+from ironic.tests.unit.db import utils as db_utils
+from ironic.tests.unit.objects import utils as object_utils
INSTANCE_INFO = db_utils.get_test_agent_instance_info()
diff --git a/ironic/tests/drivers/test_agent_base_vendor.py b/ironic/tests/unit/drivers/test_agent_base_vendor.py
index a0f268fb8..2cf23ab3e 100644
--- a/ironic/tests/drivers/test_agent_base_vendor.py
+++ b/ironic/tests/unit/drivers/test_agent_base_vendor.py
@@ -31,10 +31,10 @@ from ironic.drivers.modules import agent_client
from ironic.drivers.modules import deploy_utils
from ironic.drivers.modules import fake
from ironic import objects
-from ironic.tests.conductor import utils as mgr_utils
-from ironic.tests.db import base as db_base
-from ironic.tests.db import utils as db_utils
-from ironic.tests.objects import utils as object_utils
+from ironic.tests.unit.conductor import utils as mgr_utils
+from ironic.tests.unit.db import base as db_base
+from ironic.tests.unit.db import utils as db_utils
+from ironic.tests.unit.objects import utils as object_utils
INSTANCE_INFO = db_utils.get_test_agent_instance_info()
DRIVER_INFO = db_utils.get_test_agent_driver_info()
diff --git a/ironic/tests/drivers/test_agent_client.py b/ironic/tests/unit/drivers/test_agent_client.py
index fa928482f..223844882 100644
--- a/ironic/tests/drivers/test_agent_client.py
+++ b/ironic/tests/unit/drivers/test_agent_client.py
@@ -20,7 +20,7 @@ import six
from ironic.common import exception
from ironic.drivers.modules import agent_client
-from ironic.tests import base
+from ironic.tests.unit import base
class MockResponse(object):
diff --git a/ironic/tests/drivers/test_base.py b/ironic/tests/unit/drivers/test_base.py
index 948f2f951..1bd6fae47 100644
--- a/ironic/tests/drivers/test_base.py
+++ b/ironic/tests/unit/drivers/test_base.py
@@ -21,7 +21,7 @@ import mock
from ironic.common import exception
from ironic.common import raid
from ironic.drivers import base as driver_base
-from ironic.tests import base
+from ironic.tests.unit import base
class FakeVendorInterface(driver_base.VendorInterface):
@@ -104,9 +104,9 @@ class DriverPeriodicTaskTestCase(base.TestCase):
obj = TestClass()
self.assertEqual(42, obj.method._periodic_spacing)
self.assertTrue(obj.method._periodic_task)
- self.assertEqual('ironic.tests.drivers.test_base.method',
+ self.assertEqual('ironic.tests.unit.drivers.test_base.method',
obj.method._periodic_name)
- self.assertEqual('ironic.tests.drivers.test_base.function',
+ self.assertEqual('ironic.tests.unit.drivers.test_base.function',
function._periodic_name)
obj.method(1, bar=2)
diff --git a/ironic/tests/drivers/test_console_utils.py b/ironic/tests/unit/drivers/test_console_utils.py
index 7f3f8cfdb..23762e9f8 100644
--- a/ironic/tests/drivers/test_console_utils.py
+++ b/ironic/tests/unit/drivers/test_console_utils.py
@@ -32,9 +32,9 @@ from ironic.common import exception
from ironic.common import utils
from ironic.drivers.modules import console_utils
from ironic.drivers.modules import ipmitool as ipmi
-from ironic.tests.db import base as db_base
-from ironic.tests.db import utils as db_utils
-from ironic.tests.objects import utils as obj_utils
+from ironic.tests.unit.db import base as db_base
+from ironic.tests.unit.db import utils as db_utils
+from ironic.tests.unit.objects import utils as obj_utils
CONF = cfg.CONF
diff --git a/ironic/tests/drivers/test_deploy_utils.py b/ironic/tests/unit/drivers/test_deploy_utils.py
index bbb163f16..33ccb2221 100644
--- a/ironic/tests/drivers/test_deploy_utils.py
+++ b/ironic/tests/unit/drivers/test_deploy_utils.py
@@ -44,11 +44,11 @@ from ironic.drivers.modules import agent_client
from ironic.drivers.modules import deploy_utils as utils
from ironic.drivers.modules import image_cache
from ironic.drivers.modules import pxe
-from ironic.tests import base as tests_base
-from ironic.tests.conductor import utils as mgr_utils
-from ironic.tests.db import base as db_base
-from ironic.tests.db import utils as db_utils
-from ironic.tests.objects import utils as obj_utils
+from ironic.tests.unit import base as tests_base
+from ironic.tests.unit.conductor import utils as mgr_utils
+from ironic.tests.unit.db import base as db_base
+from ironic.tests.unit.db import utils as db_utils
+from ironic.tests.unit.objects import utils as obj_utils
INST_INFO_DICT = db_utils.get_test_pxe_instance_info()
DRV_INFO_DICT = db_utils.get_test_pxe_driver_info()
diff --git a/ironic/tests/drivers/test_fake.py b/ironic/tests/unit/drivers/test_fake.py
index 0cca07602..26ca601db 100644
--- a/ironic/tests/drivers/test_fake.py
+++ b/ironic/tests/unit/drivers/test_fake.py
@@ -25,9 +25,9 @@ from ironic.common import exception
from ironic.common import states
from ironic.conductor import task_manager
from ironic.drivers import base as driver_base
-from ironic.tests.conductor import utils as mgr_utils
-from ironic.tests.db import base as db_base
-from ironic.tests.objects import utils as obj_utils
+from ironic.tests.unit.conductor import utils as mgr_utils
+from ironic.tests.unit.db import base as db_base
+from ironic.tests.unit.objects import utils as obj_utils
class FakeDriverTestCase(db_base.DbTestCase):
diff --git a/ironic/tests/drivers/test_iboot.py b/ironic/tests/unit/drivers/test_iboot.py
index 370cd2e11..2ad9ed09f 100644
--- a/ironic/tests/drivers/test_iboot.py
+++ b/ironic/tests/unit/drivers/test_iboot.py
@@ -26,10 +26,10 @@ from ironic.common import exception
from ironic.common import states
from ironic.conductor import task_manager
from ironic.drivers.modules import iboot
-from ironic.tests.conductor import utils as mgr_utils
-from ironic.tests.db import base as db_base
-from ironic.tests.db import utils as db_utils
-from ironic.tests.objects import utils as obj_utils
+from ironic.tests.unit.conductor import utils as mgr_utils
+from ironic.tests.unit.db import base as db_base
+from ironic.tests.unit.db import utils as db_utils
+from ironic.tests.unit.objects import utils as obj_utils
INFO_DICT = db_utils.get_test_iboot_info()
diff --git a/ironic/tests/drivers/test_image_cache.py b/ironic/tests/unit/drivers/test_image_cache.py
index 89dbaabec..447db0a99 100644
--- a/ironic/tests/drivers/test_image_cache.py
+++ b/ironic/tests/unit/drivers/test_image_cache.py
@@ -31,7 +31,7 @@ from ironic.common import image_service
from ironic.common import images
from ironic.common import utils
from ironic.drivers.modules import image_cache
-from ironic.tests import base
+from ironic.tests.unit import base
def touch(filename):
diff --git a/ironic/tests/drivers/test_inspector.py b/ironic/tests/unit/drivers/test_inspector.py
index 4e44189fc..349acb4b8 100644
--- a/ironic/tests/drivers/test_inspector.py
+++ b/ironic/tests/unit/drivers/test_inspector.py
@@ -20,9 +20,9 @@ from ironic.common import keystone
from ironic.common import states
from ironic.conductor import task_manager
from ironic.drivers.modules import inspector
-from ironic.tests.conductor import utils as mgr_utils
-from ironic.tests.db import base as db_base
-from ironic.tests.objects import utils as obj_utils
+from ironic.tests.unit.conductor import utils as mgr_utils
+from ironic.tests.unit.db import base as db_base
+from ironic.tests.unit.objects import utils as obj_utils
class DisabledTestCase(db_base.DbTestCase):
diff --git a/ironic/tests/drivers/test_ipminative.py b/ironic/tests/unit/drivers/test_ipminative.py
index 2a5b0df0f..8cc1ecf87 100644
--- a/ironic/tests/drivers/test_ipminative.py
+++ b/ironic/tests/unit/drivers/test_ipminative.py
@@ -31,10 +31,10 @@ from ironic.conductor import task_manager
from ironic.drivers.modules import console_utils
from ironic.drivers.modules import ipminative
from ironic.drivers import utils as driver_utils
-from ironic.tests.conductor import utils as mgr_utils
-from ironic.tests.db import base as db_base
-from ironic.tests.db import utils as db_utils
-from ironic.tests.objects import utils as obj_utils
+from ironic.tests.unit.conductor import utils as mgr_utils
+from ironic.tests.unit.db import base as db_base
+from ironic.tests.unit.db import utils as db_utils
+from ironic.tests.unit.objects import utils as obj_utils
INFO_DICT = db_utils.get_test_ipmi_info()
diff --git a/ironic/tests/drivers/test_ipmitool.py b/ironic/tests/unit/drivers/test_ipmitool.py
index 284ceb958..6a80b7ea9 100644
--- a/ironic/tests/drivers/test_ipmitool.py
+++ b/ironic/tests/unit/drivers/test_ipmitool.py
@@ -42,11 +42,11 @@ from ironic.conductor import task_manager
from ironic.drivers.modules import console_utils
from ironic.drivers.modules import ipmitool as ipmi
from ironic.drivers import utils as driver_utils
-from ironic.tests import base
-from ironic.tests.conductor import utils as mgr_utils
-from ironic.tests.db import base as db_base
-from ironic.tests.db import utils as db_utils
-from ironic.tests.objects import utils as obj_utils
+from ironic.tests.unit import base
+from ironic.tests.unit.conductor import utils as mgr_utils
+from ironic.tests.unit.db import base as db_base
+from ironic.tests.unit.db import utils as db_utils
+from ironic.tests.unit.objects import utils as obj_utils
CONF = cfg.CONF
diff --git a/ironic/tests/drivers/test_irmc.py b/ironic/tests/unit/drivers/test_irmc.py
index 51989a318..51989a318 100644
--- a/ironic/tests/drivers/test_irmc.py
+++ b/ironic/tests/unit/drivers/test_irmc.py
diff --git a/ironic/tests/drivers/test_iscsi_deploy.py b/ironic/tests/unit/drivers/test_iscsi_deploy.py
index 5e381da9c..261f11766 100644
--- a/ironic/tests/drivers/test_iscsi_deploy.py
+++ b/ironic/tests/unit/drivers/test_iscsi_deploy.py
@@ -37,10 +37,10 @@ from ironic.drivers.modules import deploy_utils
from ironic.drivers.modules import fake
from ironic.drivers.modules import iscsi_deploy
from ironic.drivers.modules import pxe
-from ironic.tests.conductor import utils as mgr_utils
-from ironic.tests.db import base as db_base
-from ironic.tests.db import utils as db_utils
-from ironic.tests.objects import utils as obj_utils
+from ironic.tests.unit.conductor import utils as mgr_utils
+from ironic.tests.unit.db import base as db_base
+from ironic.tests.unit.db import utils as db_utils
+from ironic.tests.unit.objects import utils as obj_utils
CONF = cfg.CONF
diff --git a/ironic/tests/drivers/test_pxe.py b/ironic/tests/unit/drivers/test_pxe.py
index 04e63eced..178ffb088 100644
--- a/ironic/tests/drivers/test_pxe.py
+++ b/ironic/tests/unit/drivers/test_pxe.py
@@ -34,10 +34,10 @@ from ironic.common import utils
from ironic.conductor import task_manager
from ironic.drivers.modules import deploy_utils
from ironic.drivers.modules import pxe
-from ironic.tests.conductor import utils as mgr_utils
-from ironic.tests.db import base as db_base
-from ironic.tests.db import utils as db_utils
-from ironic.tests.objects import utils as obj_utils
+from ironic.tests.unit.conductor import utils as mgr_utils
+from ironic.tests.unit.db import base as db_base
+from ironic.tests.unit.db import utils as db_utils
+from ironic.tests.unit.objects import utils as obj_utils
CONF = cfg.CONF
diff --git a/ironic/tests/drivers/test_seamicro.py b/ironic/tests/unit/drivers/test_seamicro.py
index 5767e3a42..63d816112 100644
--- a/ironic/tests/drivers/test_seamicro.py
+++ b/ironic/tests/unit/drivers/test_seamicro.py
@@ -26,10 +26,10 @@ from ironic.common import states
from ironic.conductor import task_manager
from ironic.drivers.modules import console_utils
from ironic.drivers.modules import seamicro
-from ironic.tests.conductor import utils as mgr_utils
-from ironic.tests.db import base as db_base
-from ironic.tests.db import utils as db_utils
-from ironic.tests.objects import utils as obj_utils
+from ironic.tests.unit.conductor import utils as mgr_utils
+from ironic.tests.unit.db import base as db_base
+from ironic.tests.unit.db import utils as db_utils
+from ironic.tests.unit.objects import utils as obj_utils
INFO_DICT = db_utils.get_test_seamicro_info()
diff --git a/ironic/tests/drivers/test_snmp.py b/ironic/tests/unit/drivers/test_snmp.py
index 4865681d3..5842739f0 100644
--- a/ironic/tests/drivers/test_snmp.py
+++ b/ironic/tests/unit/drivers/test_snmp.py
@@ -29,11 +29,11 @@ from ironic.common import exception
from ironic.common import states
from ironic.conductor import task_manager
from ironic.drivers.modules import snmp as snmp
-from ironic.tests import base
-from ironic.tests.conductor import utils as mgr_utils
-from ironic.tests.db import base as db_base
-from ironic.tests.db import utils as db_utils
-from ironic.tests.objects import utils as obj_utils
+from ironic.tests.unit import base
+from ironic.tests.unit.conductor import utils as mgr_utils
+from ironic.tests.unit.db import base as db_base
+from ironic.tests.unit.db import utils as db_utils
+from ironic.tests.unit.objects import utils as obj_utils
CONF = cfg.CONF
INFO_DICT = db_utils.get_test_snmp_info()
diff --git a/ironic/tests/drivers/test_ssh.py b/ironic/tests/unit/drivers/test_ssh.py
index 043625230..a7c25667c 100644
--- a/ironic/tests/drivers/test_ssh.py
+++ b/ironic/tests/unit/drivers/test_ssh.py
@@ -31,10 +31,10 @@ from ironic.common import utils
from ironic.conductor import task_manager
from ironic.drivers.modules import ssh
from ironic.drivers import utils as driver_utils
-from ironic.tests.conductor import utils as mgr_utils
-from ironic.tests.db import base as db_base
-from ironic.tests.db import utils as db_utils
-from ironic.tests.objects import utils as obj_utils
+from ironic.tests.unit.conductor import utils as mgr_utils
+from ironic.tests.unit.db import base as db_base
+from ironic.tests.unit.db import utils as db_utils
+from ironic.tests.unit.objects import utils as obj_utils
CONF = cfg.CONF
diff --git a/ironic/tests/drivers/test_utils.py b/ironic/tests/unit/drivers/test_utils.py
index efb63fa81..af49e0e67 100644
--- a/ironic/tests/drivers/test_utils.py
+++ b/ironic/tests/unit/drivers/test_utils.py
@@ -21,9 +21,9 @@ from ironic.conductor import task_manager
from ironic.conductor import utils as manager_utils
from ironic.drivers.modules import fake
from ironic.drivers import utils as driver_utils
-from ironic.tests.conductor import utils as mgr_utils
-from ironic.tests.db import base as db_base
-from ironic.tests.objects import utils as obj_utils
+from ironic.tests.unit.conductor import utils as mgr_utils
+from ironic.tests.unit.db import base as db_base
+from ironic.tests.unit.objects import utils as obj_utils
class UtilsTestCase(db_base.DbTestCase):
diff --git a/ironic/tests/drivers/test_virtualbox.py b/ironic/tests/unit/drivers/test_virtualbox.py
index a6ede977b..a854cb553 100644
--- a/ironic/tests/drivers/test_virtualbox.py
+++ b/ironic/tests/unit/drivers/test_virtualbox.py
@@ -22,9 +22,9 @@ from ironic.common import exception
from ironic.common import states
from ironic.conductor import task_manager
from ironic.drivers.modules import virtualbox
-from ironic.tests.conductor import utils as mgr_utils
-from ironic.tests.db import base as db_base
-from ironic.tests.objects import utils as obj_utils
+from ironic.tests.unit.conductor import utils as mgr_utils
+from ironic.tests.unit.db import base as db_base
+from ironic.tests.unit.objects import utils as obj_utils
INFO_DICT = {
'virtualbox_vmname': 'baremetal1',
diff --git a/ironic/tests/drivers/test_wol.py b/ironic/tests/unit/drivers/test_wol.py
index c98f1ab11..f8e02e298 100644
--- a/ironic/tests/drivers/test_wol.py
+++ b/ironic/tests/unit/drivers/test_wol.py
@@ -26,9 +26,9 @@ from ironic.common import exception
from ironic.common import states
from ironic.conductor import task_manager
from ironic.drivers.modules import wol
-from ironic.tests.conductor import utils as mgr_utils
-from ironic.tests.db import base as db_base
-from ironic.tests.objects import utils as obj_utils
+from ironic.tests.unit.conductor import utils as mgr_utils
+from ironic.tests.unit.db import base as db_base
+from ironic.tests.unit.objects import utils as obj_utils
@mock.patch.object(time, 'sleep', lambda *_: None)
diff --git a/ironic/tests/drivers/third_party_driver_mock_specs.py b/ironic/tests/unit/drivers/third_party_driver_mock_specs.py
index 94666d043..94666d043 100644
--- a/ironic/tests/drivers/third_party_driver_mock_specs.py
+++ b/ironic/tests/unit/drivers/third_party_driver_mock_specs.py
diff --git a/ironic/tests/drivers/third_party_driver_mocks.py b/ironic/tests/unit/drivers/third_party_driver_mocks.py
index 6389c6382..e88959aab 100644
--- a/ironic/tests/drivers/third_party_driver_mocks.py
+++ b/ironic/tests/unit/drivers/third_party_driver_mocks.py
@@ -36,7 +36,8 @@ from oslo_utils import importutils
import six
from ironic.drivers.modules import ipmitool
-from ironic.tests.drivers import third_party_driver_mock_specs as mock_specs
+from ironic.tests.unit.drivers import third_party_driver_mock_specs \
+ as mock_specs
# attempt to load the external 'seamicroclient' library, which is
diff --git a/ironic/tests/objects/__init__.py b/ironic/tests/unit/drivers/ucs/__init__.py
index e69de29bb..e69de29bb 100644
--- a/ironic/tests/objects/__init__.py
+++ b/ironic/tests/unit/drivers/ucs/__init__.py
diff --git a/ironic/tests/drivers/ucs/test_helper.py b/ironic/tests/unit/drivers/ucs/test_helper.py
index 245bfc17b..c83e82d46 100644
--- a/ironic/tests/drivers/ucs/test_helper.py
+++ b/ironic/tests/unit/drivers/ucs/test_helper.py
@@ -22,10 +22,10 @@ from ironic.common import exception
from ironic.conductor import task_manager
from ironic.db import api as dbapi
from ironic.drivers.modules.ucs import helper as ucs_helper
-from ironic.tests.conductor import utils as mgr_utils
-from ironic.tests.db import base as db_base
-from ironic.tests.db import utils as db_utils
-from ironic.tests.objects import utils as obj_utils
+from ironic.tests.unit.conductor import utils as mgr_utils
+from ironic.tests.unit.db import base as db_base
+from ironic.tests.unit.db import utils as db_utils
+from ironic.tests.unit.objects import utils as obj_utils
ucs_error = importutils.try_import('UcsSdk.utils.exception')
diff --git a/ironic/tests/drivers/ucs/test_management.py b/ironic/tests/unit/drivers/ucs/test_management.py
index a16c72bf5..17101756b 100644
--- a/ironic/tests/drivers/ucs/test_management.py
+++ b/ironic/tests/unit/drivers/ucs/test_management.py
@@ -25,10 +25,10 @@ from ironic.common import exception
from ironic.conductor import task_manager
from ironic.drivers.modules.ucs import helper as ucs_helper
from ironic.drivers.modules.ucs import management as ucs_mgmt
-from ironic.tests.conductor import utils as mgr_utils
-from ironic.tests.db import base as db_base
-from ironic.tests.db import utils as db_utils
-from ironic.tests.objects import utils as obj_utils
+from ironic.tests.unit.conductor import utils as mgr_utils
+from ironic.tests.unit.db import base as db_base
+from ironic.tests.unit.db import utils as db_utils
+from ironic.tests.unit.objects import utils as obj_utils
ucs_error = importutils.try_import('UcsSdk.utils.exception')
diff --git a/ironic/tests/drivers/ucs/test_power.py b/ironic/tests/unit/drivers/ucs/test_power.py
index 378c68b48..a01a96bbd 100644
--- a/ironic/tests/drivers/ucs/test_power.py
+++ b/ironic/tests/unit/drivers/ucs/test_power.py
@@ -22,10 +22,10 @@ from ironic.common import states
from ironic.conductor import task_manager
from ironic.drivers.modules.ucs import helper as ucs_helper
from ironic.drivers.modules.ucs import power as ucs_power
-from ironic.tests.conductor import utils as mgr_utils
-from ironic.tests.db import base as db_base
-from ironic.tests.db import utils as db_utils
-from ironic.tests.objects import utils as obj_utils
+from ironic.tests.unit.conductor import utils as mgr_utils
+from ironic.tests.unit.db import base as db_base
+from ironic.tests.unit.db import utils as db_utils
+from ironic.tests.unit.objects import utils as obj_utils
ucs_error = importutils.try_import('UcsSdk.utils.exception')
diff --git a/ironic/tests/fake_policy.py b/ironic/tests/unit/fake_policy.py
index 66f600845..66f600845 100644
--- a/ironic/tests/fake_policy.py
+++ b/ironic/tests/unit/fake_policy.py
diff --git a/ironic/tests/unit/objects/__init__.py b/ironic/tests/unit/objects/__init__.py
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/ironic/tests/unit/objects/__init__.py
diff --git a/ironic/tests/objects/test_chassis.py b/ironic/tests/unit/objects/test_chassis.py
index 566bc4926..d4859a571 100644
--- a/ironic/tests/objects/test_chassis.py
+++ b/ironic/tests/unit/objects/test_chassis.py
@@ -20,8 +20,8 @@ from testtools.matchers import HasLength
from ironic.common import exception
from ironic import objects
-from ironic.tests.db import base
-from ironic.tests.db import utils
+from ironic.tests.unit.db import base
+from ironic.tests.unit.db import utils
class TestChassisObject(base.DbTestCase):
diff --git a/ironic/tests/objects/test_conductor.py b/ironic/tests/unit/objects/test_conductor.py
index caea16481..6cb8e6bc0 100644
--- a/ironic/tests/objects/test_conductor.py
+++ b/ironic/tests/unit/objects/test_conductor.py
@@ -21,8 +21,8 @@ from oslo_utils import timeutils
from ironic import objects
from ironic.objects import fields
-from ironic.tests.db import base
-from ironic.tests.db import utils
+from ironic.tests.unit.db import base
+from ironic.tests.unit.db import utils
class TestConductorObject(base.DbTestCase):
diff --git a/ironic/tests/objects/test_fields.py b/ironic/tests/unit/objects/test_fields.py
index a9d736ac9..53817c42f 100644
--- a/ironic/tests/objects/test_fields.py
+++ b/ironic/tests/unit/objects/test_fields.py
@@ -16,7 +16,7 @@
from ironic.common import exception
from ironic.objects import fields
-from ironic.tests import base as test_base
+from ironic.tests.unit import base as test_base
class TestMacAddressField(test_base.TestCase):
diff --git a/ironic/tests/objects/test_node.py b/ironic/tests/unit/objects/test_node.py
index 1de56d9a8..09ffc6eff 100644
--- a/ironic/tests/objects/test_node.py
+++ b/ironic/tests/unit/objects/test_node.py
@@ -18,8 +18,8 @@ from testtools.matchers import HasLength
from ironic.common import exception
from ironic import objects
-from ironic.tests.db import base
-from ironic.tests.db import utils
+from ironic.tests.unit.db import base
+from ironic.tests.unit.db import utils
class TestNodeObject(base.DbTestCase):
diff --git a/ironic/tests/objects/test_objects.py b/ironic/tests/unit/objects/test_objects.py
index 1cb67fe26..a30e9d959 100644
--- a/ironic/tests/objects/test_objects.py
+++ b/ironic/tests/unit/objects/test_objects.py
@@ -25,7 +25,7 @@ import six
from ironic.objects import base
from ironic.objects import fields
-from ironic.tests import base as test_base
+from ironic.tests.unit import base as test_base
gettext.install('ironic')
diff --git a/ironic/tests/objects/test_port.py b/ironic/tests/unit/objects/test_port.py
index 19559e3c0..445ca84b7 100644
--- a/ironic/tests/objects/test_port.py
+++ b/ironic/tests/unit/objects/test_port.py
@@ -19,8 +19,8 @@ from testtools.matchers import HasLength
from ironic.common import exception
from ironic import objects
-from ironic.tests.db import base
-from ironic.tests.db import utils
+from ironic.tests.unit.db import base
+from ironic.tests.unit.db import utils
class TestPortObject(base.DbTestCase):
diff --git a/ironic/tests/objects/utils.py b/ironic/tests/unit/objects/utils.py
index aa21c91fd..79577f924 100644
--- a/ironic/tests/objects/utils.py
+++ b/ironic/tests/unit/objects/utils.py
@@ -15,7 +15,7 @@
"""Ironic object test utilities."""
from ironic import objects
-from ironic.tests.db import utils as db_utils
+from ironic.tests.unit.db import utils as db_utils
def get_test_node(ctxt, **kw):
diff --git a/ironic/tests/policy_fixture.py b/ironic/tests/unit/policy_fixture.py
index 372fb204f..7f3f48ac9 100644
--- a/ironic/tests/policy_fixture.py
+++ b/ironic/tests/unit/policy_fixture.py
@@ -19,7 +19,7 @@ from oslo_config import cfg
from oslo_policy import opts as policy_opts
from ironic.common import policy as ironic_policy
-from ironic.tests import fake_policy
+from ironic.tests.unit import fake_policy
CONF = cfg.CONF
diff --git a/ironic/tests/raid_constants.py b/ironic/tests/unit/raid_constants.py
index c3db74f4d..c3db74f4d 100644
--- a/ironic/tests/raid_constants.py
+++ b/ironic/tests/unit/raid_constants.py
diff --git a/ironic/tests/stubs.py b/ironic/tests/unit/stubs.py
index d20c1fd8a..d20c1fd8a 100644
--- a/ironic/tests/stubs.py
+++ b/ironic/tests/unit/stubs.py