def testSingleModule(self): survey = self.createClientSurvey() survey.invokeFactory("euphorie.module", "1") self.assertEqual( update.getSurveyTree(survey), [{"optional": False, "zodb_path": "1", "type": "module", "has_description": False}], )
def testModuleAndRisk(self): survey = self.createClientSurvey() survey.invokeFactory("euphorie.module", "1") survey["1"].invokeFactory("euphorie.risk", "2") self.assertEqual( update.getSurveyTree(survey), [ { "optional": False, "zodb_path": "1", "type": "module", "has_description": False, "always_present": False, "risk_type": None, }, { "optional": False, "zodb_path": "1/2", "type": "risk", "has_description": False, "always_present": False, "risk_type": "risk", }, ], )
def testModuleAndRisk(self): survey = self.createClientSurvey() survey.invokeFactory("euphorie.module", "1") survey["1"].invokeFactory("euphorie.risk", "2") self.assertEqual(update.getSurveyTree(survey), [{'optional': False, 'zodb_path': "1", 'type': "module", 'has_description': False, 'always_present': False}, {'optional': False, 'zodb_path': '1/2', 'type': 'risk', 'has_description': False, 'always_present': False}])
def testModuleAndRisk(self): survey = self.createClientSurvey() survey.invokeFactory("euphorie.module", "1") survey["1"].invokeFactory("euphorie.risk", "2") self.assertEqual( update.getSurveyTree(survey), [ {"optional": False, "zodb_path": "1", "type": "module", "has_description": False}, {"optional": False, "zodb_path": "1/2", "type": "risk", "has_description": False}, ], )
def testEmpty(self): survey = self.createClientSurvey() self.assertEqual(update.getSurveyTree(survey), [])
def testSingleModule(self): survey = self.createClientSurvey() survey.invokeFactory("euphorie.module", "1") self.assertEqual(update.getSurveyTree(survey), [{'optional': False, 'zodb_path': '1', 'type': 'module', 'has_description': False, 'always_present': False}])