예제 #1
0
 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}],
     )
예제 #2
0
 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",
             },
         ],
     )
예제 #3
0
 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}])
예제 #4
0
 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},
         ],
     )
예제 #5
0
 def testEmpty(self):
     survey = self.createClientSurvey()
     self.assertEqual(update.getSurveyTree(survey), [])
예제 #6
0
 def testEmpty(self):
     survey = self.createClientSurvey()
     self.assertEqual(update.getSurveyTree(survey), [])
예제 #7
0
 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}])