Пример #1
0
 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
Пример #2
0
def gen_project(provider):
    return Project(provider, fauxfactory.gen_alpha().lower())
Пример #3
0
 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')
Пример #4
0
 def get_project_by_name(self, project_name):
     """Returns only the selected Project object"""
     return Project(self, project_name)