source: main/waeup.sirp/trunk/src/waeup/sirp/accesscodes/tests/test_workflow.py @ 7143

Last change on this file since 7143 was 7137, checked in by Henrik Bettermann, 13 years ago

Set value Id for property svn:keywords in all Python files.

  • Property svn:keywords set to Id
File size: 1.0 KB
Line 
1import shutil
2import tempfile
3from waeup.sirp.testing import FunctionalLayer, FunctionalTestCase
4from waeup.sirp.accesscodes.workflow import (
5    invalidate_action, disable_used_action, disable_unused_action,
6    reenable_action,
7    )
8
9class WorkflowActionsTests(FunctionalTestCase):
10    # Tests for helpers like get_access_code, disable_accesscode, ...
11
12    layer = FunctionalLayer
13
14    def setUp(self):
15        super(WorkflowActionsTests, self).setUp()
16        self.workdir = tempfile.mkdtemp()
17
18    def tearDown(self):
19        shutil.rmtree(self.workdir)
20        super(WorkflowActionsTests, self).tearDown()
21        return
22
23    def test_actions_wo_parents(self):
24        # We can pass contexts without parent to actions
25        context = object() # Some fake context without parent
26        self.assertTrue(invalidate_action(None, context) is None)
27        self.assertTrue(disable_used_action(None, context) is None)
28        self.assertTrue(disable_unused_action(None, context) is None)
29        self.assertTrue(reenable_action(None, context) is None)
30        return
Note: See TracBrowser for help on using the repository browser.