def test_one_vm_required(self): obj = Vm() rv = plugin.selector(obj) self.assertIsInstance(rv, list) self.assertEqual(2, len(rv)) self.assertEqual("vdc.yaml", rv[0].file) self.assertEqual("template.yaml", rv[1].file)
def test_match(self): objs = [Template(), Vdc(), Vm()] self.assertIs(plugin.workflow, plugin.selector(*objs))