Newer
Older
from .factories import StageFactory, WorkflowFactory
from .workflow import Stage, Workflow
class TestWorkflowCreation(SimpleTestCase):
def test_can_create_workflow(self):
name = 'single_stage'
self.assertCountEqual(workflow.stages, [stage])
def test_stages_required_for_workflow(self):
name = 'single_stage'
with self.assertRaises(ValueError):
Workflow(name)
stages = StageFactory.create_batch(2)
workflow = Workflow('two_stage', *stages)
for stage, check in zip(workflow, stages):
# def test_returns_none_if_no_next_stage(self):
# workflow = Workflow('two_stage', stage1, stage2)
class TestStageCreation(SimpleTestCase):
def test_can_create_stage(self):
name = 'the_stage'