summaryrefslogtreecommitdiff
path: root/openstackclient/tests/unit/compute
diff options
context:
space:
mode:
authorStephen Finucane <sfinucan@redhat.com>2021-01-19 17:11:48 +0000
committerStephen Finucane <sfinucan@redhat.com>2021-01-21 11:01:15 +0000
commit32ae1857d12fc2d5b4292e2d98caed0238959081 (patch)
treedb1ac1caa66beee5b9fbb56913317a9beab98143 /openstackclient/tests/unit/compute
parent9ed34aac0a172ece4cd856319486208fcdba095d (diff)
downloadpython-openstackclient-32ae1857d12fc2d5b4292e2d98caed0238959081.tar.gz
Rename FakeServerMigration to FakeMigration
Server migrations are (confusingly) a different thing returned by a different API. Change-Id: Ib6b7c8f9cc3d1521a993616f832d41651dc46f73 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Diffstat (limited to 'openstackclient/tests/unit/compute')
-rw-r--r--openstackclient/tests/unit/compute/v2/fakes.py20
-rw-r--r--openstackclient/tests/unit/compute/v2/test_server.py4
2 files changed, 12 insertions, 12 deletions
diff --git a/openstackclient/tests/unit/compute/v2/fakes.py b/openstackclient/tests/unit/compute/v2/fakes.py
index e4cf1045..7f3dcae4 100644
--- a/openstackclient/tests/unit/compute/v2/fakes.py
+++ b/openstackclient/tests/unit/compute/v2/fakes.py
@@ -1566,12 +1566,12 @@ class FakeRateLimit(object):
self.next_available = next_available
-class FakeServerMigration(object):
- """Fake one or more server migrations."""
+class FakeMigration(object):
+ """Fake one or more migrations."""
@staticmethod
- def create_one_server_migration(attrs=None, methods=None):
- """Create a fake server migration.
+ def create_one_migration(attrs=None, methods=None):
+ """Create a fake migration.
:param Dictionary attrs:
A dictionary with all attributes
@@ -1612,22 +1612,22 @@ class FakeServerMigration(object):
return migration
@staticmethod
- def create_server_migrations(attrs=None, methods=None, count=2):
- """Create multiple fake server migrations.
+ def create_migrations(attrs=None, methods=None, count=2):
+ """Create multiple fake migrations.
:param Dictionary attrs:
A dictionary with all attributes
:param Dictionary methods:
A dictionary with all methods
:param int count:
- The number of server migrations to fake
+ The number of migrations to fake
:return:
- A list of FakeResource objects faking the server migrations
+ A list of FakeResource objects faking the migrations
"""
migrations = []
for i in range(0, count):
migrations.append(
- FakeServerMigration.create_one_server_migration(
+ FakeMigration.create_one_migration(
attrs, methods))
return migrations
@@ -1680,7 +1680,7 @@ class FakeVolumeAttachment(object):
:param Dictionary methods:
A dictionary with all methods
:param int count:
- The number of server migrations to fake
+ The number of volume attachments to fake
:return:
A list of FakeResource objects faking the volume attachments.
"""
diff --git a/openstackclient/tests/unit/compute/v2/test_server.py b/openstackclient/tests/unit/compute/v2/test_server.py
index 5cf76c88..5025f020 100644
--- a/openstackclient/tests/unit/compute/v2/test_server.py
+++ b/openstackclient/tests/unit/compute/v2/test_server.py
@@ -4396,8 +4396,8 @@ class TestListMigration(TestServer):
self.server = compute_fakes.FakeServer.create_one_server()
self.servers_mock.get.return_value = self.server
- self.migrations = compute_fakes.FakeServerMigration\
- .create_server_migrations(count=3)
+ self.migrations = compute_fakes.FakeMigration.create_migrations(
+ count=3)
self.migrations_mock.list.return_value = self.migrations
self.data = (common_utils.get_item_properties(