From 6c1b03bf7354fe39d61bb9cf93d2491bbb5ebb16 Mon Sep 17 00:00:00 2001 From: Tom Jose Kalapura Date: Fri, 9 Sep 2016 22:17:50 -0700 Subject: 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 --- openstackclient/tests/unit/identity/v3/fakes.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'openstackclient/tests/unit/identity/v3/fakes.py') 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.""" -- cgit v1.2.1