Skip to content

Commit 82770fa

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "Rename FakeServerMigration to FakeMigration"
2 parents e8a5069 + 32ae185 commit 82770fa

2 files changed

Lines changed: 12 additions & 12 deletions

File tree

openstackclient/tests/unit/compute/v2/fakes.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1566,12 +1566,12 @@ def __init__(self, verb, uri, value, remain,
15661566
self.next_available = next_available
15671567

15681568

1569-
class FakeServerMigration(object):
1570-
"""Fake one or more server migrations."""
1569+
class FakeMigration(object):
1570+
"""Fake one or more migrations."""
15711571

15721572
@staticmethod
1573-
def create_one_server_migration(attrs=None, methods=None):
1574-
"""Create a fake server migration.
1573+
def create_one_migration(attrs=None, methods=None):
1574+
"""Create a fake migration.
15751575
15761576
:param Dictionary attrs:
15771577
A dictionary with all attributes
@@ -1612,22 +1612,22 @@ def create_one_server_migration(attrs=None, methods=None):
16121612
return migration
16131613

16141614
@staticmethod
1615-
def create_server_migrations(attrs=None, methods=None, count=2):
1616-
"""Create multiple fake server migrations.
1615+
def create_migrations(attrs=None, methods=None, count=2):
1616+
"""Create multiple fake migrations.
16171617
16181618
:param Dictionary attrs:
16191619
A dictionary with all attributes
16201620
:param Dictionary methods:
16211621
A dictionary with all methods
16221622
:param int count:
1623-
The number of server migrations to fake
1623+
The number of migrations to fake
16241624
:return:
1625-
A list of FakeResource objects faking the server migrations
1625+
A list of FakeResource objects faking the migrations
16261626
"""
16271627
migrations = []
16281628
for i in range(0, count):
16291629
migrations.append(
1630-
FakeServerMigration.create_one_server_migration(
1630+
FakeMigration.create_one_migration(
16311631
attrs, methods))
16321632

16331633
return migrations
@@ -1680,7 +1680,7 @@ def create_volume_attachments(attrs=None, methods=None, count=2):
16801680
:param Dictionary methods:
16811681
A dictionary with all methods
16821682
:param int count:
1683-
The number of server migrations to fake
1683+
The number of volume attachments to fake
16841684
:return:
16851685
A list of FakeResource objects faking the volume attachments.
16861686
"""

openstackclient/tests/unit/compute/v2/test_server.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4396,8 +4396,8 @@ def setUp(self):
43964396
self.server = compute_fakes.FakeServer.create_one_server()
43974397
self.servers_mock.get.return_value = self.server
43984398

4399-
self.migrations = compute_fakes.FakeServerMigration\
4400-
.create_server_migrations(count=3)
4399+
self.migrations = compute_fakes.FakeMigration.create_migrations(
4400+
count=3)
44014401
self.migrations_mock.list.return_value = self.migrations
44024402

44034403
self.data = (common_utils.get_item_properties(

0 commit comments

Comments
 (0)