Example #1
0
 def test_create_rule_add_params(self):
     create_rule_from_existing(name="foo", template="bar", workflow=self.workflow, **{'params':((), {'cmd':'bar', 'options':['foo']})})
     self.assertDictEqual({'cmd':'bar', 'options':['foo']}, dict(self.workflow.get_rule("foo").params))
Example #2
0
 def test_create_rule_add_output(self):
     create_rule_from_existing(name="foo", template="bar", workflow=self.workflow, **{'output':((), {'bar':'foo'})})
     self.assertDictEqual({'bar':'foo'}, dict(self.workflow.get_rule("foo").output))
Example #3
0
 def test_create_rule_empty_workflow(self):
     create_rule_from_existing(name="foo", template="bar", workflow=Workflow("foo"))
Example #4
0
 def test_create_rule_wrong_template(self):
     create_rule_from_existing(name="bar", template="foo", workflow=self.workflow)
Example #5
0
 def test_create_rule(self):
     self.assertListEqual(["bar"], [x.name for x in self.workflow.rules])
     create_rule_from_existing(name="foo", template="bar", workflow=self.workflow)
     self.assertListEqual(["bar", "foo"], [x.name for x in self.workflow.rules])