def test_get_workflow_steps(self): # See orchestra.tests.helpers.fixtures for workflow description steps = get_workflow_steps('w3', 'crazy_workflow') slugs = [step['slug'] for step in steps] self.assertTrue(slugs.index('stepC') > slugs.index('stepA')) self.assertTrue(slugs.index('stepC') > slugs.index('stepB')) self.assertTrue(slugs.index('stepD') > slugs.index('stepA')) self.assertTrue(slugs.index('stepD') > slugs.index('stepB')) self.assertTrue(slugs.index('stepE') > slugs.index('stepC')) self.assertTrue(slugs.index('stepE') > slugs.index('stepD')) self.assertTrue(slugs.index('stepF') > slugs.index('stepE')) self.assertTrue(slugs.index('stepG') > slugs.index('stepF')) self.assertTrue(slugs.index('stepH') > slugs.index('stepF')) steps = get_workflow_steps('w4', 'erroneous_workflow_1') with self.assertRaises(MalformedDependencyException): steps = get_workflow_steps('w5', 'erroneous_workflow_2')
def test_get_workflow_steps(self): # See orchestra.tests.helpers.fixtures for workflow description steps = get_workflow_steps('w3', 'crazy_workflow') slugs = [step['slug'] for step in steps] self.assertTrue(slugs.index('stepC') > slugs.index('stepA')) self.assertTrue(slugs.index('stepC') > slugs.index('stepB')) self.assertTrue(slugs.index('stepD') > slugs.index('stepA')) self.assertTrue(slugs.index('stepD') > slugs.index('stepB')) self.assertTrue(slugs.index('stepE') > slugs.index('stepC')) self.assertTrue(slugs.index('stepE') > slugs.index('stepD')) self.assertTrue(slugs.index('stepF') > slugs.index('stepE')) self.assertTrue(slugs.index('stepG') > slugs.index('stepF')) self.assertTrue(slugs.index('stepH') > slugs.index('stepF')) steps = get_workflow_steps('w4', 'erroneous_workflow_1') with self.assertRaises(MalformedDependencyException): steps = get_workflow_steps('w5', 'erroneous_workflow_2')