diff options
| author | Tom Jose Kalapura <tomjosekal@gmail.com> | 2016-09-09 22:17:50 -0700 |
|---|---|---|
| committer | Mike Perez <thingee@gmail.com> | 2017-03-08 08:47:35 -0800 |
| commit | 6c1b03bf7354fe39d61bb9cf93d2491bbb5ebb16 (patch) | |
| tree | 686a7e6b6d564df3436cdb6feab17da2bd9c94cd /openstackclient/tests/unit/identity/v3/fakes.py | |
| parent | ed4454c5bba8c912c310c92f94a7c17a2b44ee10 (diff) | |
| download | python-openstackclient-6c1b03bf7354fe39d61bb9cf93d2491bbb5ebb16.tar.gz | |
Add sort support to project list
Add sort support to project list by sorting items in the client side.
By default list will be sorted by name.
Change-Id: I00011406846b4003aff075eeeb88ac18fa5e2820
Closes-Bug: #1596818
Diffstat (limited to 'openstackclient/tests/unit/identity/v3/fakes.py')
| -rw-r--r-- | openstackclient/tests/unit/identity/v3/fakes.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/openstackclient/tests/unit/identity/v3/fakes.py b/openstackclient/tests/unit/identity/v3/fakes.py index 7b76fa60..473efcfe 100644 --- a/openstackclient/tests/unit/identity/v3/fakes.py +++ b/openstackclient/tests/unit/identity/v3/fakes.py @@ -622,6 +622,23 @@ class FakeProject(object): loaded=True) return project + @staticmethod + def create_projects(attrs=None, count=2): + """Create multiple fake projects. + + :param Dictionary attrs: + A dictionary with all attributes + :param int count: + The number of projects to fake + :return: + A list of FakeResource objects faking the projects + """ + + projects = [] + for i in range(0, count): + projects.append(FakeProject.create_one_project(attrs)) + return projects + class FakeDomain(object): """Fake one or more domain.""" |
