Exemplo n.º 1
0
 def test_workflows__member_workflow__states__private__permission__View(self):
     workflow = get_workflow(self.portal, 'member_workflow')
     state = workflow.states.private
     self.assertEqual(state.getPermissionInfo('View'), {
         'acquired': 0,
         'roles': ['Manager', 'Owner', 'Site Administrator'],
     })
Exemplo n.º 2
0
 def test_workflows__member_workflow__permissions(self):
     workflow = get_workflow(self.portal, 'member_workflow')
     self.assertEqual(workflow.permissions, (
         'Access contents information',
         'Copy or Move',
         'List folder contents',
         'Modify portal content',
         'View'))
Exemplo n.º 3
0
 def test_workflows__member_workflow__states__private__permission__View(
         self):
     workflow = get_workflow(self.portal, 'member_workflow')
     state = workflow.states.private
     self.assertEqual(state.getPermissionInfo('View'), {
         'acquired': 0,
         'roles': ['Manager', 'Owner', 'Site Administrator'],
     })
Exemplo n.º 4
0
 def test_workflows__member_workflow__title(self):
     workflow = get_workflow(self.portal, 'member_workflow')
     self.assertEqual(workflow.title, 'Member Workflow')
Exemplo n.º 5
0
 def test_workflows__member_workflow__manager_bypass(self):
     workflow = get_workflow(self.portal, 'member_workflow')
     self.assertFalse(workflow.manager_bypass)
Exemplo n.º 6
0
 def test_workflows__member_workflow__initial_state(self):
     workflow = get_workflow(self.portal, 'member_workflow')
     self.assertEqual(workflow.initial_state, 'private')
Exemplo n.º 7
0
 def test_workflows__member_workflow__variables__time__updata_always(self):
     workflow = get_workflow(self.portal, 'member_workflow')
     variable = workflow.variables.time
     self.assertTrue(variable.update_always)
Exemplo n.º 8
0
 def test_workflows__member_workflow__variables__review_history__default(
         self):
     workflow = get_workflow(self.portal, 'member_workflow')
     variable = workflow.variables.review_history
     self.assertEqual(variable.getDefaultExprText(),
                      "state_change/getHistory")
Exemplo n.º 9
0
 def test_workflows__member_workflow__variables__comments__default(self):
     workflow = get_workflow(self.portal, 'member_workflow')
     variable = workflow.variables.comments
     self.assertEqual(variable.getDefaultExprText(),
                      "python:state_change.kwargs.get('comment', '')")
Exemplo n.º 10
0
 def test_workflows__member_workflow__variables__action__default(self):
     workflow = get_workflow(self.portal, 'member_workflow')
     variable = workflow.variables.action
     self.assertEqual(variable.getDefaultExprText(),
                      'transition/getId|nothing')
Exemplo n.º 11
0
 def test_workflows__member_workflow__states__private__description(self):
     workflow = get_workflow(self.portal, 'member_workflow')
     state = workflow.states.private
     self.assertEqual(state.description, 'Can only be seen and edited by the owner.')
Exemplo n.º 12
0
 def test_workflows__member_workflow__states__private__title(self):
     workflow = get_workflow(self.portal, 'member_workflow')
     state = workflow.states.private
     self.assertEqual(state.title, 'Private')
Exemplo n.º 13
0
 def test_workflows__member_workflow__title(self):
     workflow = get_workflow(self.portal, 'member_workflow')
     self.assertEqual(workflow.title, 'Member Workflow')
Exemplo n.º 14
0
 def test_workflows__member_workflow__state_variable(self):
     workflow = get_workflow(self.portal, 'member_workflow')
     self.assertEqual(workflow.state_var, 'review_state')
Exemplo n.º 15
0
 def test_workflows__member_workflow__manager_bypass(self):
     workflow = get_workflow(self.portal, 'member_workflow')
     self.assertFalse(workflow.manager_bypass)
Exemplo n.º 16
0
 def test_workflows__member_workflow__states__private__title(self):
     workflow = get_workflow(self.portal, 'member_workflow')
     state = workflow.states.private
     self.assertEqual(state.title, 'Private')
Exemplo n.º 17
0
 def test_workflows__member_workflow__variables__action__description(self):
     workflow = get_workflow(self.portal, 'member_workflow')
     variable = workflow.variables.action
     self.assertEqual(variable.description, 'Previous transition')
Exemplo n.º 18
0
 def test_workflows__member_workflow__variables__action__default(self):
     workflow = get_workflow(self.portal, 'member_workflow')
     variable = workflow.variables.action
     self.assertEqual(variable.getDefaultExprText(), 'transition/getId|nothing')
Exemplo n.º 19
0
 def test_workflows__member_workflow__variables__actor__default(self):
     workflow = get_workflow(self.portal, 'member_workflow')
     variable = workflow.variables.actor
     self.assertEqual(variable.getDefaultExprText(), 'user/getId')
Exemplo n.º 20
0
 def test_workflows__member_workflow__variables__actor__description(self):
     workflow = get_workflow(self.portal, 'member_workflow')
     variable = workflow.variables.actor
     self.assertEqual(variable.description, 'The ID of the user who performed the last transition')
Exemplo n.º 21
0
 def test_workflows__member_workflow__variables__review_history__updata_always(
         self):
     workflow = get_workflow(self.portal, 'member_workflow')
     variable = workflow.variables.review_history
     self.assertFalse(variable.update_always)
Exemplo n.º 22
0
 def test_workflows__member_workflow__variables__actor__default(self):
     workflow = get_workflow(self.portal, 'member_workflow')
     variable = workflow.variables.actor
     self.assertEqual(variable.getDefaultExprText(), 'user/getId')
Exemplo n.º 23
0
 def test_workflows__member_workflow__variables__time__for_catalog(self):
     workflow = get_workflow(self.portal, 'member_workflow')
     variable = workflow.variables.time
     self.assertFalse(variable.for_catalog)
Exemplo n.º 24
0
 def test_workflows__member_workflow__variables__comments__description(self):
     workflow = get_workflow(self.portal, 'member_workflow')
     variable = workflow.variables.comments
     self.assertEqual(variable.description, 'Comment about the last transition')
Exemplo n.º 25
0
 def test_workflows__member_workflow__variables__time__default(self):
     workflow = get_workflow(self.portal, 'member_workflow')
     variable = workflow.variables.time
     self.assertEqual(variable.getDefaultExprText(),
                      "state_change/getDateTime")
Exemplo n.º 26
0
 def test_workflows__member_workflow__variables__comments__default(self):
     workflow = get_workflow(self.portal, 'member_workflow')
     variable = workflow.variables.comments
     self.assertEqual(variable.getDefaultExprText(),
         "python:state_change.kwargs.get('comment', '')")
Exemplo n.º 27
0
 def test_workflows__member_workflow__initial_state(self):
     workflow = get_workflow(self.portal, 'member_workflow')
     self.assertEqual(workflow.initial_state, 'private')
Exemplo n.º 28
0
 def test_workflows__member_workflow__variables__review_history__for_status(self):
     workflow = get_workflow(self.portal, 'member_workflow')
     variable = workflow.variables.review_history
     self.assertFalse(variable.for_status)
Exemplo n.º 29
0
 def test_workflows__member_workflow__state_variable(self):
     workflow = get_workflow(self.portal, 'member_workflow')
     self.assertEqual(workflow.state_var, 'review_state')
Exemplo n.º 30
0
 def test_workflows__member_workflow__variables__review_history__updata_always(self):
     workflow = get_workflow(self.portal, 'member_workflow')
     variable = workflow.variables.review_history
     self.assertFalse(variable.update_always)
Exemplo n.º 31
0
 def test_workflows__member_workflow__permissions(self):
     workflow = get_workflow(self.portal, 'member_workflow')
     self.assertEqual(
         workflow.permissions,
         ('Access contents information', 'Copy or Move',
          'List folder contents', 'Modify portal content', 'View'))
Exemplo n.º 32
0
 def test_workflows__member_workflow__variables__review_history__description(self):
     workflow = get_workflow(self.portal, 'member_workflow')
     variable = workflow.variables.review_history
     self.assertEqual(variable.description, 'Provides access to workflow history')
Exemplo n.º 33
0
 def test_workflows__member_workflow__states__private__description(self):
     workflow = get_workflow(self.portal, 'member_workflow')
     state = workflow.states.private
     self.assertEqual(state.description,
                      'Can only be seen and edited by the owner.')
Exemplo n.º 34
0
 def test_workflows__member_workflow__variables__review_history__default(self):
     workflow = get_workflow(self.portal, 'member_workflow')
     variable = workflow.variables.review_history
     self.assertEqual(variable.getDefaultExprText(),
         "state_change/getHistory")
Exemplo n.º 35
0
 def test_workflows__member_workflow__variables__action__description(self):
     workflow = get_workflow(self.portal, 'member_workflow')
     variable = workflow.variables.action
     self.assertEqual(variable.description, 'Previous transition')
Exemplo n.º 36
0
 def test_workflows__member_workflow__variables__review_history__guard(self):
     workflow = get_workflow(self.portal, 'member_workflow')
     variable = workflow.variables.review_history
     self.assertEqual(variable.info_guard.permissions,
         ('Request review', 'Review portal content'))
Exemplo n.º 37
0
 def test_workflows__member_workflow__variables__actor__description(self):
     workflow = get_workflow(self.portal, 'member_workflow')
     variable = workflow.variables.actor
     self.assertEqual(
         variable.description,
         'The ID of the user who performed the last transition')
Exemplo n.º 38
0
 def test_workflows__member_workflow__variables__time__for_catalog(self):
     workflow = get_workflow(self.portal, 'member_workflow')
     variable = workflow.variables.time
     self.assertFalse(variable.for_catalog)
Exemplo n.º 39
0
 def test_workflows__member_workflow__variables__comments__description(
         self):
     workflow = get_workflow(self.portal, 'member_workflow')
     variable = workflow.variables.comments
     self.assertEqual(variable.description,
                      'Comment about the last transition')
Exemplo n.º 40
0
 def test_workflows__member_workflow__variables__time__for_status(self):
     workflow = get_workflow(self.portal, 'member_workflow')
     variable = workflow.variables.time
     self.assertTrue(variable.for_status)
Exemplo n.º 41
0
 def test_workflows__member_workflow__variables__review_history__for_status(
         self):
     workflow = get_workflow(self.portal, 'member_workflow')
     variable = workflow.variables.review_history
     self.assertFalse(variable.for_status)
Exemplo n.º 42
0
 def test_workflows__member_workflow__variables__time__updata_always(self):
     workflow = get_workflow(self.portal, 'member_workflow')
     variable = workflow.variables.time
     self.assertTrue(variable.update_always)
Exemplo n.º 43
0
 def test_workflows__member_workflow__variables__review_history__description(
         self):
     workflow = get_workflow(self.portal, 'member_workflow')
     variable = workflow.variables.review_history
     self.assertEqual(variable.description,
                      'Provides access to workflow history')
Exemplo n.º 44
0
 def test_workflows__member_workflow__variables__time__description(self):
     workflow = get_workflow(self.portal, 'member_workflow')
     variable = workflow.variables.time
     self.assertEqual(variable.description, 'When the previous transition was performed')
Exemplo n.º 45
0
 def test_workflows__member_workflow__variables__review_history__guard(
         self):
     workflow = get_workflow(self.portal, 'member_workflow')
     variable = workflow.variables.review_history
     self.assertEqual(variable.info_guard.permissions,
                      ('Request review', 'Review portal content'))
Exemplo n.º 46
0
 def test_workflows__member_workflow__variables__time__default(self):
     workflow = get_workflow(self.portal, 'member_workflow')
     variable = workflow.variables.time
     self.assertEqual(variable.getDefaultExprText(),
         "state_change/getDateTime")
Exemplo n.º 47
0
 def test_workflows__member_workflow__variables__time__for_status(self):
     workflow = get_workflow(self.portal, 'member_workflow')
     variable = workflow.variables.time
     self.assertTrue(variable.for_status)
Exemplo n.º 48
0
 def test_workflows__member_workflow__variables__time__guard(self):
     workflow = get_workflow(self.portal, 'member_workflow')
     variable = workflow.variables.time
     self.assertIsNone(variable.info_guard)
Exemplo n.º 49
0
 def test_workflows__member_workflow__variables__time__description(self):
     workflow = get_workflow(self.portal, 'member_workflow')
     variable = workflow.variables.time
     self.assertEqual(variable.description,
                      'When the previous transition was performed')
Exemplo n.º 50
0
 def test_workflows__member_workflow__description(self):
     workflow = get_workflow(self.portal, 'member_workflow')
     self.assertEqual(workflow.description,
                      'Private state only for member.')
Exemplo n.º 51
0
 def test_workflows__member_workflow__variables__time__guard(self):
     workflow = get_workflow(self.portal, 'member_workflow')
     variable = workflow.variables.time
     self.assertIsNone(variable.info_guard)
Exemplo n.º 52
0
 def test_workflows__member_workflow__description(self):
     workflow = get_workflow(self.portal, 'member_workflow')
     self.assertEqual(workflow.description, 'Private state only for member.')