def lst(args): """ List orgs """ c = VCloudAPIClient() for org in c.org_list().orgs: _dump(org)
def test_org_list_should_return_list_of_orgs(self): c = VCloudAPIClient() org_list_xml = fixture('orglist') # org_list should work out where to look from the hypermedia returned # at the /session path. "/myCustomOrgListPath/" is where the orgList # is defined to exist in the "session" fixture self.register_response('get', API_ROOT + '/myCustomOrgListPath/', 200, {}, org_list_xml) org_list = c.org_list() assert_equal(len(org_list.orgs), 3)