def list_project(self): """Returns list of projects""" entities = [] entities_j = self.o_api.get('project')[1]['items'] for entity_j in entities_j: meta = entity_j['metadata'] entity = Project(self, meta['name']) entities.append(entity) return entities
def gen_project(provider): return Project(provider, fauxfactory.gen_alpha().lower())
def test_invalid_name(self): with pytest.raises(InvalidValueException): Project(provider, 'this_is_invalid_project_name') Project(provider, 'this/is/invalid/project/name/as/well')
def get_project_by_name(self, project_name): """Returns only the selected Project object""" return Project(self, project_name)