summaryrefslogtreecommitdiff
path: root/nova/tests/unit/conductor/tasks/test_cross_cell_migrate.py
diff options
context:
space:
mode:
Diffstat (limited to 'nova/tests/unit/conductor/tasks/test_cross_cell_migrate.py')
-rw-r--r--nova/tests/unit/conductor/tasks/test_cross_cell_migrate.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/nova/tests/unit/conductor/tasks/test_cross_cell_migrate.py b/nova/tests/unit/conductor/tasks/test_cross_cell_migrate.py
index 127d763477..c4b6c217b6 100644
--- a/nova/tests/unit/conductor/tasks/test_cross_cell_migrate.py
+++ b/nova/tests/unit/conductor/tasks/test_cross_cell_migrate.py
@@ -11,8 +11,8 @@
# under the License.
import copy
+from unittest import mock
-import mock
from oslo_messaging import exceptions as messaging_exceptions
from oslo_utils.fixture import uuidsentinel as uuids
from oslo_utils import timeutils
@@ -439,7 +439,7 @@ class CrossCellMigrationTaskTestCase(test.NoDBTestCase):
what we need.
"""
with mock.patch.object(
- self.task.network_api, 'supports_port_binding_extension',
+ self.task.network_api, 'has_port_binding_extension',
return_value=True) as mock_neutron_check:
self.task._perform_external_api_checks()
mock_neutron_check.assert_called_once_with(self.task.context)
@@ -447,7 +447,7 @@ class CrossCellMigrationTaskTestCase(test.NoDBTestCase):
def test_perform_external_api_checks_old_neutron(self):
"""Tests the case that neutron API is old."""
with mock.patch.object(
- self.task.network_api, 'supports_port_binding_extension',
+ self.task.network_api, 'has_port_binding_extension',
return_value=False):
ex = self.assertRaises(exception.MigrationPreCheckError,
self.task._perform_external_api_checks)