Esempio n. 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))
Esempio n. 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))
Esempio n. 3
0
 def test_create_rule_empty_workflow(self):
     create_rule_from_existing(name="foo", template="bar", workflow=Workflow("foo"))
Esempio n. 4
0
 def test_create_rule_wrong_template(self):
     create_rule_from_existing(name="bar", template="foo", workflow=self.workflow)
Esempio n. 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])