def test_addProject(self, scenario):
     add = models.ScenarioProject(project='qtip').format()
     scenario['installers'][0]['versions'][0]['projects'].append(add)
     update = models.ScenarioUpdateRequest(field='project',
                                           op='add',
                                           locate={
                                               'installer': 'apex',
                                               'version': 'master'
                                           },
                                           term=add)
     return update, scenario
Example #2
0
 def test_updateProjects_bad_schema(self):
     update = models.ScenarioProject(project='functest').format()
     update['score'] = None
     return [update]
Example #3
0
 def test_updateProjects_duplicated(self):
     update = models.ScenarioProject(project='qtip').format()
     return [update, update]
Example #4
0
 def test_updateProjects_succ(self):
     update = models.ScenarioProject(project='qtip').format()
     self.req_d['installers'][0]['versions'][0]['projects'] = [update]
     return [update]
Example #5
0
 def test_addProjects_bad_schema(self):
     add = models.ScenarioProject(project='functest').format()
     add['score'] = None
     return [add]
Example #6
0
 def test_addProjects_already_exist(self):
     add = models.ScenarioProject(project='functest').format()
     return [add]
Example #7
0
 def test_addProjects_succ(self):
     add = models.ScenarioProject(project='qtip').format()
     self.req_d['installers'][0]['versions'][0]['projects'].append(add)
     return [add]
Example #8
0
 def test_updateProjects_bad_schema(self, scenario):
     update = models.ScenarioProject(project='functest').format()
     update['score'] = None
     scenario['installers'][0]['versions'][0]['projects'] = [update]
     return [update], scenario
Example #9
0
 def test_addProjects_bad_schema(self, scenario):
     add = models.ScenarioProject(project='functest').format()
     add['score'] = None
     scenario['installers'][0]['versions'][0]['projects'].append(add)
     return [add], scenario
Example #10
0
 def test_addProjects_already_exist(self, scenario):
     add = models.ScenarioProject(project='functest').format()
     scenario['installers'][0]['versions'][0]['projects'].append(add)
     return [add], scenario