Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(19)  |  Call(16)  |  Derive(0)  |  Import(3)

src/f/t/ftw.lawgiver-1.2.2/ftw/lawgiver/tests/test_wdl_specificaiton.py   ftw.lawgiver(Download)
from ftw.lawgiver.wdl.specification import Specification
from ftw.lawgiver.wdl.specification import Status
from ftw.lawgiver.wdl.specification import Transition
from ftw.lawgiver.wdl.interfaces import ISpecification
from ftw.lawgiver.wdl.interfaces import IStatus
    def test_string_repr(self):
        obj = Specification(title='My Workflow')
        self.assertEquals(unicode(obj),
                          u'<Specification "My Workflow">')
 
    def test_VALIDATION_no_initial_status(self):
        obj = Specification('My Workflow')
    def test_VALIDATION_unkown_initial_status(self):
        obj = Specification('My Workflow', initial_status_title='Foo')
        with self.assertRaises(ValueError) as cm:
            obj.validate()
 
        self.assertEquals('Definition of initial status "Foo" not found.',
                          str(cm.exception))
 
    def test_VALIDATION_visible_roles_must_be_in_role_mapping(self):
        obj = Specification('My Workflow',

src/f/t/ftw.lawgiver-1.2.2/ftw/lawgiver/tests/test_generator_unit.py   ftw.lawgiver(Download)
from ftw.lawgiver.tests import workflowxml
from ftw.lawgiver.tests.base import BaseTest
from ftw.lawgiver.wdl.specification import Specification
from ftw.lawgiver.wdl.specification import Status
from ftw.lawgiver.wdl.specification import Transition
    def test_simple_workflow(self):
        spec = Specification(title='Example Workflow',
                             description='the Description',
                             initial_status_title='Foo')
        spec.states['Foo'] = Status('Foo', [])
    def test_multi_word_utf8_status_titles(self):
        status_title = 'Hello W\xc3\xb6rld'
        spec = Specification(title='W\xc3\xb6rkflow',
                             initial_status_title=status_title)
        spec.states[status_title] = Status(status_title, [])
    def test_workflow_with_transitions(self):
        spec = Specification(title='WF',
                             initial_status_title='Foo')
        foo = spec.states['Foo'] = Status('Foo', [])
        bar = spec.states['Bar'] = Status('Bar', [])
    def test_workflow_with_custom_transition_url(self):
        spec = Specification(
            title='WF',
            initial_status_title='Foo',
            custom_transition_url='%%(content_url)s/custom_wf_action'

src/f/t/ftw.lawgiver-1.2.2/ftw/lawgiver/wdl/parser.py   ftw.lawgiver(Download)
from ftw.lawgiver.exceptions import ParsingError
from ftw.lawgiver.wdl.interfaces import IWorkflowSpecificationParser
from ftw.lawgiver.wdl.specification import Specification
from ftw.lawgiver.wdl.specification import Status
from ftw.lawgiver.wdl.specification import Transition
            self._call_consumer(name, value, specargs)
 
        self._spec = Specification(**specargs)
 
    @consumer(r'^[Dd]escription$')