瀏覽代碼

Add unit tests for the `taskflow/utils.py` module

Signed-off-by: Mihaela Balutoiu <mbalutoiu@cloudbasesolutions.com>
Mihaela Balutoiu 2 年之前
父節點
當前提交
f9f2f0196c
共有 1 個文件被更改,包括 20 次插入0 次删除
  1. 20 0
      coriolis/tests/taskflow/test_utils.py

+ 20 - 0
coriolis/tests/taskflow/test_utils.py

@@ -0,0 +1,20 @@
+# Copyright 2023 Cloudbase Solutions Srl
+# All Rights Reserved.
+
+
+from coriolis.taskflow import utils
+from coriolis.tests import test_base
+
+
+class DummyDeciderTestCase(test_base.CoriolisBaseTestCase):
+    """Test suite for the Coriolis DummyDecider class."""
+
+    def setUp(self):
+        super(DummyDeciderTestCase, self).setUp()
+        self.decider = utils.DummyDecider()
+
+    def test__init__(self):
+        self.assertEqual(True, self.decider._allow)
+
+    def test__call__(self):
+        self.assertEqual(True, self.decider('history'))